Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt with WebAssembly setup issue

Tags:

qt

webassembly

I am currently creating setup on MacOS for Qt with Web-Assembly.

I followed these two links - https://wiki.qt.io/Qt_for_WebAssembly and http://qtandeverything.blogspot.in

Steps Completed -

  1. CMAKE installation

  2. Python 2.7.10 setup

3.WASM ToolChain setup-

$ 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

==> And finally tested sample c program, it works fine.

 Ex- $ emcc hello.c -s WASM=1 -o hello.html

4.Downloaded Qt for emsdk

 Ex - git clone -b wip/webassembly https://code.qt.io/qt/qtbase.git

5.Also successfully run following two commands (/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

So my next requirement is to- (Add emscripten compiler to Qt Creator)

Found this link - http://qtandeverything.blogspot.in and step 4. suggests that to "Add emscripten compiler to Qt Creator".

So,My question is what is the way to create emscripten compiler in Qt Creator.?

Also please suggest me exact step to follow Qt with Webassembly

Thanks In Advance.

like image 765
Kiran Prusty Avatar asked Feb 06 '26 02:02

Kiran Prusty


1 Answers

After your step 5 where you make inside of your qtbase folder, a qmake file will appear. All you have to do to successfully compile a project is the following from inside of whichever Qt project folder you want to run in the browser:

/path/to/qmake/inside/qtbase && make

This will be limited to the project types that qtbase supports. You can refer link Qt For WebAssembly.

like image 106
Bret Hogg Avatar answered Feb 09 '26 02:02

Bret Hogg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!