• <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++博客 首頁(yè) 新隨筆 聯(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) 評(píng)論(0)  編輯 收藏 引用 所屬分類: QT
            久久久久久精品免费看SSS| 久久久WWW免费人成精品| 亚洲AV无码久久精品蜜桃| 久久综合狠狠色综合伊人| 久久久久久免费一区二区三区| 久久精品嫩草影院| 久久久久无码中| 日本欧美久久久久免费播放网| 久久久久夜夜夜精品国产| 亚洲?V乱码久久精品蜜桃 | 久久99精品国产一区二区三区| 久久国产精品久久| 久久精品国产2020| 久久97久久97精品免视看秋霞| 亚洲va久久久噜噜噜久久男同| 亚洲伊人久久大香线蕉苏妲己| 久久精品国产2020| 久久影院午夜理论片无码 | 久久se精品一区精品二区国产| 国产成人久久精品一区二区三区| 青青草原综合久久| 人妻丰满AV无码久久不卡| 欧美午夜A∨大片久久| 9191精品国产免费久久| 中文字幕无码免费久久| 久久人人爽人人澡人人高潮AV| 国产日产久久高清欧美一区| 色偷偷偷久久伊人大杳蕉| 少妇人妻综合久久中文字幕| 久久伊人色| 午夜福利91久久福利| 久久性精品| 模特私拍国产精品久久| 怡红院日本一道日本久久 | 亚洲精品乱码久久久久久按摩 | 嫩草伊人久久精品少妇AV| 国产精品久久婷婷六月丁香| 色欲综合久久躁天天躁| 人妻丰满?V无码久久不卡| 久久伊人中文无码| 国内精品九九久久精品|