• <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
            久久国产成人精品麻豆| 99久久精品国产高清一区二区 | 久久久久一级精品亚洲国产成人综合AV区 | 久久综合给久久狠狠97色| 无码日韩人妻精品久久蜜桃| 国内精品伊人久久久久av一坑 | 国产成人精品白浆久久69| 一本久久久久久久| 久久综合色老色| 麻豆精品久久久一区二区| 中文字幕无码av激情不卡久久| 亚洲AV日韩AV永久无码久久| 丁香久久婷婷国产午夜视频| 久久精品国产亚洲av麻豆蜜芽| 久久99免费视频| 熟妇人妻久久中文字幕| 久久国产综合精品五月天| 久久国产精品99国产精| 精品久久久久久久国产潘金莲| 久久99中文字幕久久| 亚洲中文久久精品无码ww16| 久久国产精品视频| 成人久久精品一区二区三区| 2021国产精品久久精品| 久久夜色撩人精品国产小说| 久久综合综合久久狠狠狠97色88| 日韩av无码久久精品免费| 伊人久久大香线蕉成人| 久久五月精品中文字幕| 久久综合久久综合久久| 狠狠狠色丁香婷婷综合久久五月| 久久亚洲精品人成综合网| 国产色综合久久无码有码| 狠狠色丁香久久婷婷综合蜜芽五月| 精品久久久久久无码免费| 国产亚洲成人久久| 精品无码久久久久久久动漫| 亚洲国产成人久久综合碰碰动漫3d | 久久成人国产精品二三区| 久久精品国产亚洲精品2020 | 久久久久亚洲AV无码专区桃色|