• <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++博客 首頁 新隨筆 聯(lián)系 聚合 管理
              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上有的一個(gè)特性:

            ADD_EXECUTABLE(**  WIN32 **)

            posted on 2013-04-13 21:25 Enic 閱讀(2866) 評論(0)  編輯 收藏 引用 所屬分類: QT
            99久久精品免费观看国产| 久久99国产精品一区二区| 久久无码人妻一区二区三区| 欧美午夜精品久久久久久浪潮| 久久精品aⅴ无码中文字字幕不卡| 一级a性色生活片久久无 | 久久精品18| 久久av高潮av无码av喷吹| 久久精品国产99国产精偷| 久久久国产精品福利免费| 国产午夜精品理论片久久影视 | 亚洲午夜无码久久久久| 狠狠色婷婷久久综合频道日韩| 亚洲精品成人久久久| 伊人久久精品影院| 奇米影视7777久久精品| 久久国产精品77777| 久久综合狠狠色综合伊人| 成人a毛片久久免费播放| 久久影视国产亚洲| 99久久精品国产一区二区| 久久久噜噜噜www成人网| 久久久久久久99精品免费观看| 成人精品一区二区久久| 国产精品久久久久久久app| 国内精品综合久久久40p| 69久久精品无码一区二区| 99久久国产主播综合精品| 色狠狠久久综合网| 97久久香蕉国产线看观看| 久久国产成人精品国产成人亚洲| 久久综合亚洲鲁鲁五月天| 久久精品国产半推半就| 伊色综合久久之综合久久| 久久精品国产99国产精偷| 久久中文字幕视频、最近更新 | 色偷偷88888欧美精品久久久| 国产高潮国产高潮久久久91 | 97超级碰碰碰久久久久| 亚洲精品国产第一综合99久久| 国产精品国色综合久久|