Qt 与 WebAssembly 设置问题
findumars
阅读:115
2025-06-02 22:19:02
评论:0
我目前正在使用 Web-Assembly 在 MacOS 上为 Qt 创 build 置。
我关注了这两个链接 - https://wiki.qt.io/Qt_for_WebAssembly和 http://qtandeverything.blogspot.in
已完成的步骤 -
3.WASM工具链设置-
$ git clone https://github.com/juj/emsdk.git
$ cd emsdk
$ ./emsdk install --build=Release sdk-incoming-64bit binaryen-master-64bit
$ ./emsdk activate --build=Release sdk-incoming-64bit binaryen-master- 64bit
$ source ./emsdk_env.sh --build=Release
==> 最后测试了示例 c 程序,它工作正常。
Ex- $ emcc hello.c -s WASM=1 -o hello.html
4.为emsdk下载Qt
Ex - git clone -b wip/webassembly https://code.qt.io/qt/qtbase.git
5.还成功运行以下两个命令(/Path/To/Qt/5.11.0/Src/qtbase) -
$/configure -xplatform emscripten -confirm-license -opensource -developer-build -release -static -no-thread -nomake tests -nomake examples -no-dbus -no-headersclean -no-feature-networkinterface -system-libpng -no-ssl -no-warnings-are-errors
$make
所以我的下一个要求是——(将 emscripten 编译器添加到 Qt Creator)
找到这个链接 - http://qtandeverything.blogspot.in 和步骤 4. 建议“将 emscripten 编译器添加到 Qt Creator”。
所以,我的问题是在 Qt Creator 中创建 emscripten 编译器的方法是什么?
还请建议我使用 Webassembly 遵循 Qt 的确切步骤
提前致谢。
请您参考如下方法:
在您的第 5 步之后,您 make在您的 qtbase 文件夹中,将出现一个 qmake 文件。成功编译项目所需要做的就是从要在浏览器中运行的任何 Qt 项目文件夹中执行以下操作:
/path/to/qmake/inside/qtbase && make
这将仅限于 qtbase 支持的项目类型。
可以引用链接 Qt For WebAssembly .
声明
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。



