• <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
            蜜臀av性久久久久蜜臀aⅴ| 久久天堂电影网| 久久se精品一区精品二区| 亚洲日本va中文字幕久久| 亚洲?V乱码久久精品蜜桃| 久久综合视频网站| 伊人久久一区二区三区无码| 青青热久久国产久精品| 国产三级精品久久| 国产精自产拍久久久久久蜜 | 久久这里只有精品18| 精品国产乱码久久久久久人妻| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 99久久国产热无码精品免费| 久久综合狠狠综合久久| 中文字幕久久久久人妻| 日本久久久久亚洲中字幕 | 久久国产乱子伦免费精品| 久久久久亚洲精品无码蜜桃| 久久99精品国产| 久久精品三级视频| 久久精品国产2020| 精品熟女少妇av免费久久| 久久不射电影网| 久久伊人精品青青草原日本| 成人综合久久精品色婷婷 | 久久精品九九亚洲精品| 99国内精品久久久久久久| 欧美久久久久久| 久久精品九九亚洲精品天堂 | 久久se精品一区精品二区| 国产精品va久久久久久久| 色悠久久久久久久综合网| 久久久久国产精品熟女影院| 91精品国产高清久久久久久91| 午夜精品久久久久久影视riav| 国产成人久久精品一区二区三区 | 久久久国产精华液| 日韩人妻无码一区二区三区久久 | 久久久国产乱子伦精品作者 | 久久亚洲精品无码观看不卡|