• <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 閱讀(2870) 評論(0)  編輯 收藏 引用 所屬分類: QT
            精品免费久久久久久久| 精品无码久久久久久久动漫| 国产精品久久久久免费a∨| 7777久久久国产精品消防器材| 色综合久久综合中文综合网| 99久久国语露脸精品国产| 久久伊人色| 国产一级持黄大片99久久| 久久久久久久波多野结衣高潮| 欧美综合天天夜夜久久| 亚洲国产精品无码久久98| 久久人人爽人人爽人人片AV麻豆| 久久综合精品国产二区无码| 亚洲精品无码久久毛片| 亚洲狠狠综合久久| 狠狠色丁香久久婷婷综合五月 | 国产精品无码久久久久| 久久久久久国产精品免费无码| 日日狠狠久久偷偷色综合0| 青青青青久久精品国产| 久久精品欧美日韩精品| 亚洲女久久久噜噜噜熟女| 婷婷久久五月天| 精品久久久一二三区| 久久无码国产| 亚洲一区精品伊人久久伊人 | 精品九九久久国内精品| 亚洲国产另类久久久精品小说| 亚洲精品高清一二区久久| 久久久久国产精品三级网| 88久久精品无码一区二区毛片 | 麻豆一区二区99久久久久| 亚洲精品国精品久久99热一| 欧美牲交A欧牲交aⅴ久久| 嫩草伊人久久精品少妇AV| 69久久夜色精品国产69| 韩国免费A级毛片久久| 国产精品久久久久久搜索| 国产精品狼人久久久久影院| 久久久精品波多野结衣| 国产精品一区二区久久精品涩爱|