• <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
            久久久久国产一级毛片高清板 | 成人午夜精品久久久久久久小说| 久久精品国产网红主播| 亚洲国产精品无码久久一区二区 | 久久只这里是精品66| 久久久久久国产a免费观看不卡| 国产一区二区精品久久凹凸| 久久久一本精品99久久精品88| 99久久久国产精品免费无卡顿| 国内精品久久久久久久久电影网| 久久最新免费视频| 国产巨作麻豆欧美亚洲综合久久 | 91精品国产91久久久久久蜜臀 | 久久亚洲精品国产精品婷婷| 国产精品无码久久久久久| 美女久久久久久| 久久91精品久久91综合| 久久午夜无码鲁丝片| 国内精品伊人久久久久妇| 久久久久亚洲?V成人无码| 久久精品国产乱子伦| 久久亚洲电影| 国产精品午夜久久| 精品久久久久久久| 午夜精品久久久久久久久| 久久午夜免费视频| 精品无码久久久久久国产| 久久精品国产久精国产| 久久久久人妻精品一区 | 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 久久国产AVJUST麻豆| 久久男人中文字幕资源站| 99久久婷婷国产综合精品草原| 久久久一本精品99久久精品88| 精品久久亚洲中文无码| 亚洲伊人久久综合影院| 久久久久亚洲精品中文字幕| 久久午夜综合久久| 久久天天躁狠狠躁夜夜2020老熟妇 | 亚洲一区中文字幕久久| 91精品国产高清久久久久久国产嫩草 |