Qt静态库编译

下载Qt5.15.2源码库,且已安装emscripten

Download Source Package Offline Installers | Qt

Qt for WebAssembly | Qt 5.15

第一步: 
    .\configure -prefix C:\Qt\5.15.2\wasm_self -no-warnings-are-errors -xplatform wasm-emscripten -platform win32-g++  -nomake examples -opensource -confirm-license
第二步:
    mingw32-make -j4
第三步:
    mingw32-make install

编译后:

替换前,使用安装Qt5.15.2系统自带的编译器qmake+make:

C:/Qt/5.15.2/wasm_32/bin/qmake.exe E:\QtitanRibbon5.8.0\QtitanRibbon5.8.0\examples\ribbon\GalleriesDemo\GalleriesDemo.pro -spec wasm-emscripten "CONFIG+=qtquickcompiler" && C:/Qt/Tools/mingw810_32/bin/mingw32-make.exe qmake_all

替换后,使用自己编译的Qt组件进行qmake+make

C:/Qt/5.15.2/wasm_self/bin/qmake.exe E:\QtitanRibbon5.8.0\QtitanRibbon5.8.0\examples\ribbon\GalleriesDemo\GalleriesDemo.pro -spec wasm-emscripten "CONFIG+=qtquickcompiler" && E:/WebAssemblyTest/emsdk/emsdk/upstream/emscripten/emmake qmake_all

猜你喜欢

转载自blog.csdn.net/u012151242/article/details/130769661
今日推荐