• <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
            精品99久久aaa一级毛片| 久久久一本精品99久久精品88| 国产精品久久久久久搜索| 一本大道加勒比久久综合| 国产午夜精品久久久久九九| 中文字幕无码av激情不卡久久| 国产亚洲精久久久久久无码77777| 日韩av无码久久精品免费| 中文字幕亚洲综合久久| 久久午夜无码鲁丝片秋霞| 91久久精品国产免费直播| 久久久午夜精品福利内容| 国产三级久久久精品麻豆三级| 久久93精品国产91久久综合| 日韩AV无码久久一区二区| 久久国产精品免费一区| 欧美熟妇另类久久久久久不卡 | 久久精品国产亚洲AV嫖农村妇女 | 久久久久久国产a免费观看黄色大片 | 精品久久久久久久久免费影院| 久久久久亚洲av无码专区喷水| 久久久久一级精品亚洲国产成人综合AV区| 久久久久久久波多野结衣高潮 | 亚洲Av无码国产情品久久| 色综合久久最新中文字幕| 精品久久久久久成人AV| 午夜久久久久久禁播电影| 亚洲欧美日韩久久精品| 久久国产成人午夜aⅴ影院| 99久久精品国产毛片| 国产国产成人久久精品| 久久99久久99小草精品免视看| 久久精品国产久精国产一老狼| 亚洲国产精品综合久久一线| 日韩欧美亚洲综合久久影院d3| 99久久免费国产精精品| 久久66热人妻偷产精品9| 久久久一本精品99久久精品88| 久久久久久久亚洲Av无码| 久久国产精品成人影院| 久久精品国产亚洲麻豆|