乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      用mingw靜態(tài)編譯Qt4.8.2和Qt5.1.1

       dhacbp 2018-01-16

      因?yàn)橐恍﹣y七八糟的原因,我需要用mingw靜態(tài)編譯Qt4.8.2和Qt5.1.1。
      經(jīng)歷了一天的折騰之后,自覺編譯一下Qt還是件頗為麻煩的事情,故將過程略作總結(jié),以備不時(shí)之需。

      首先,在編譯之前,我需要下載mingw、qt-everywhere-opensource-src-4.8.2qt-everywhere-opensource-src-5.1.1

      然后,準(zhǔn)備開始編譯了,當(dāng)然先得把壓縮包解壓到一個(gè)合適的地方。
      我這里的路徑是"C:\Qt"下面。

      解壓完畢后,先試著編譯Qt4.8.2。
      configure命令為:

      1. configure -confirm-license -opensource -prefix "C:\Qt\Qt4.8.2" -debug-and-release -static -platform win32-g++ -nomake demos -nomake examples -nomake tests -fast  

      使用的選項(xiàng)說明:

      -confirm-license -opensource 選擇開源協(xié)議并確認(rèn)
      -prefix "C:\Qt\Qt4.8.2" 指定安裝目錄為"C:\Qt\Qt4.8.2"
      -debug-and-release 編譯debug和release版
      -static 編譯成靜態(tài)庫
      -platform win32-g++ 使用mingw編譯
      -nomake demos -nomake examples -nomake tests 不編譯這些不需要的東西
      -fast 快速編譯

      在控制臺下進(jìn)入"C:\Qt\qt-everywhere-opensource-src-4.8.2",運(yùn)行configure。
      在編譯之前,需要改一個(gè)地方:
      找到"qt-everywhere-opensource-src-4.8.2\src\3rdparty\webkit\Source\WebCore\platform"下的DefaultLocalizationStrategy.cpp文件,第327行:

      1. return WEB_UI_STRING("Look Up “<selection>”", ...);  

      把它改成這樣:(注意引號)

      1. return WEB_UI_STRING("Look Up <selection>", ...);  

      否則編譯會報(bào)錯。

      然后運(yùn)行mingw32-make開始編譯。
      編譯完畢后,找到"qt-everywhere-opensource-src-4.8.2\src\winmain"下的Makefile.Debug文件,第215行:

      1. @$(CHK_DIR_EXISTS) c:$(INSTALL_ROOT)/Qt/Qt4.8.2/lib/pkgconfig $(MKDIR) c:$(INSTALL_ROOT)/Qt/Qt4.8.2/lib/pkgconfig   

      改成:(注意$(CHK_DIR_EXISTS)和目錄的斜杠)

      1. @if not exist c:$(INSTALL_ROOT)\Qt\Qt4.8.2\lib\pkgconfig $(MKDIR) c:$(INSTALL_ROOT)\Qt\Qt4.8.2\lib\pkgconfig   

      改完后用同樣的方式修改Makefile.Release。

      最后mingw32-make install,大功告成。

      接下來編譯Qt5.1.1。
      首先還是configure命令:

      1. configure -confirm-license -opensource -prefix "C:\Qt\Qt5.1.1" -debug-and-release -static -platform win32-g++ -opengl desktop -no-angle -nomake examples -nomake tests -skip qtwebkit  

      使用的選項(xiàng)說明:(重復(fù)的就不寫了)

      -opengl desktop 選擇desktop的opengl,不這樣玩編譯會掛
      -no-angle 不使用angle,否則編譯會掛
      -nomake examples -nomake tests 不編譯這些東西。其中examples,參加編譯的話install會掛
      -skip qtwebkit 不編譯qtwebkit,否則很麻煩

      在控制臺下進(jìn)入"C:\Qt\qt-everywhere-opensource-src-5.1.1\qtbase",運(yùn)行configure。
      之后依次mingw32-make、mingw32-make install,大功告成。


      參考文章:

        本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多