• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Error

            C++博客 首頁 新隨筆 聯系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks

            http://stackoverflow.com/questions/14115024/how-to-link-qtmain-in-cmake-with-qt5

            老外真辛苦:

            I upgraded my project code from Qt4 to Qt5. It uses CMake. The conversion got well except for one line of Cmake commands related to Qt. I can’t find in current documentation, like

            How to link with QtMain from CMake (with Qt5)?

            It is the only missing bit to convert my project. Can someone point me to a doc explaining this or explain how to do it with Qt5? My Qt4 code worked correctly but the macro I can't find the Cmake macro for Qt5.

            EDIT> Here is the CMake file I have at the moment:https://bitbucket.org/klaim/aos_qt5/src/593c195c4c6889f6968d68fca018ef425783a063/tools/aosdesigner/CMakeLists.txt?at=wip_qt5

            All qt5 necessary CMake macros have been set correctly I belive, the only thing that don't work is the linking to QtMain that do nothing, as expected since there should be a Qt5 specific way of doing it that I don't find in the Qt5 documentation.

            You can browse the file history to see how it was working with Qt4.

             

            EDIT : Thanks to Archi comment (see below), simply add

            target_link_libraries(<your_app> Qt5::WinMain)

            or

            target_link_libraries(<your_app> ${Qt5Core_QTMAIN_LIBRARIES})

            in your application's CMakeLists.txt. Both syntaxes worked for me.

             

             

            //////////////////////

            順便提下CMAKE 2.8.10上有的一個特性:

            ADD_EXECUTABLE(**  WIN32 **)

            posted on 2013-04-13 21:25 Enic 閱讀(2864) 評論(0)  編輯 收藏 引用 所屬分類: QT
            亚洲精品无码专区久久久| 一本久久a久久精品综合夜夜| 精品无码久久久久久久久久| 青青草国产成人久久91网| 99久久国产综合精品成人影院| 内射无码专区久久亚洲| 久久久精品人妻一区二区三区蜜桃| 伊人久久精品无码av一区| 2021久久精品国产99国产精品| 久久久久综合网久久| 99久久国产亚洲综合精品| 91精品国产9l久久久久| 久久综合视频网站| 美女写真久久影院| 久久综合给合久久狠狠狠97色69| 97久久精品人人做人人爽| 日本强好片久久久久久AAA| 亚洲国产成人乱码精品女人久久久不卡| 伊人久久大香线蕉综合Av| 久久精品一区二区三区中文字幕| 久久精品九九亚洲精品| 国产欧美久久久精品影院| 国产一区二区精品久久凹凸| 精品少妇人妻av无码久久| 久久精品综合网| 深夜久久AAAAA级毛片免费看| 成人国内精品久久久久一区| 久久久国产打桩机| 亚洲精品97久久中文字幕无码| 99热热久久这里只有精品68| 久久久久久无码Av成人影院| 亚洲午夜久久久久久久久电影网 | 亚洲精品乱码久久久久久不卡| 狠狠色丁香久久综合五月| 无码AV波多野结衣久久| 精品人妻伦九区久久AAA片69| 久久男人AV资源网站| 久久精品国产一区二区电影| 久久久久久一区国产精品| 久久精品一区二区影院| 日本亚洲色大成网站WWW久久|