• <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 閱讀(2870) 評論(0)  編輯 收藏 引用 所屬分類: QT
            久久久久无码精品国产| 狠狠精品久久久无码中文字幕| 久久精品国产久精国产果冻传媒 | 国产精品美女久久福利网站| 中文字幕无码久久久| jizzjizz国产精品久久| 一级女性全黄久久生活片免费| 国产精品免费福利久久| 天天影视色香欲综合久久| 2021精品国产综合久久| 狠狠色狠狠色综合久久| 久久精品国产精品亚洲| 久久国产精品久久精品国产| 少妇熟女久久综合网色欲| 久久精品国产精品亚洲人人| 久久久久久亚洲Av无码精品专口| 色欲综合久久躁天天躁| 久久99热这里只有精品国产| 久久精品人人做人人爽电影| 漂亮人妻被黑人久久精品| 久久久久久精品免费看SSS| 久久强奷乱码老熟女| 精品国产乱码久久久久久浪潮 | 久久无码AV中文出轨人妻| 99久久婷婷国产一区二区| 国产精品久久久久jk制服| 久久夜色精品国产噜噜噜亚洲AV | 亚洲午夜久久久久久久久电影网 | 99国产精品久久| 91久久精一区二区三区大全| 久久国产精品成人影院| 嫩草伊人久久精品少妇AV| 久久精品午夜一区二区福利 | 亚洲国产另类久久久精品小说| 色播久久人人爽人人爽人人片AV| 三级韩国一区久久二区综合| 中文字幕无码久久人妻| 男女久久久国产一区二区三区| 亚洲成色www久久网站夜月 | 欧美亚洲国产精品久久| 国产成人久久精品一区二区三区|