• <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
            久久国产免费观看精品| 国内精品久久久久影院优| 久久精品视屏| 久久精品国产男包| 久久久青草久久久青草| 久久天天婷婷五月俺也去| 国产午夜久久影院| 亚洲精品第一综合99久久| 亚洲国产精品久久久久婷婷软件 | 精品99久久aaa一级毛片| 久久这里只有精品视频99| 亚洲综合伊人久久综合| 久久精品国产亚洲一区二区三区| 日韩久久久久久中文人妻| 久久精品一区二区影院| 99久久超碰中文字幕伊人| 久久99热这里只频精品6| A级毛片无码久久精品免费| 午夜精品久久久久久中宇| 久久人妻AV中文字幕| 欧美精品丝袜久久久中文字幕 | 欧美噜噜久久久XXX| 一本色综合久久| 久久www免费人成精品香蕉| 国产综合久久久久| 蜜臀av性久久久久蜜臀aⅴ| 久久久久久久97| 久久中文字幕精品| 欧美成人免费观看久久| 午夜精品久久影院蜜桃| 色综合久久88色综合天天 | 久久青青国产| 久久无码专区国产精品发布| 色综合久久天天综线观看| 久久夜色精品国产| 欧美色综合久久久久久| 欧美粉嫩小泬久久久久久久| 亚洲欧美一级久久精品| 久久久久久精品免费看SSS | 久久精品国产亚洲5555| 欧美性大战久久久久久|