Important: Please read the Qt Code of Conduct -

Qt WebAssembly: Porting Current Qt C++ project to web assembly

  • Hello,

    Currently i have working C++ project using qt and it is build on VISUAL STUDIO 2017.
    Now i have a question:

    How can i start to write it for web assembly in order to have web version for it.

    Any suggestions

  • Lifetime Qt Champion


    Did you already tried to build your project with a Qt version built for WebAssembly ?

  • Yes i did , it gives some errors that LLVM bitcode is not generated.
    I am sure I am missing something in my build command on bash.

    Here it is:
    ./../../QcStyle/Style.h:14:10: fatal error: 'QcStyle/Base/Application.h' file not found
    #include <QcStyle/Base/Application.h>
    1 error generated.
    ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
    Makefile:921: recipe for target 'main.o' failed
    make: *** [main.o] Error 1

  • this is my

    As you can see, includepath has the path to the desired library, but still the error persists. Please someone help out:

    qmake is not working for qt5 on bash.0_1554991328394_Capture.PNG

  • Lifetime Qt Champion

    You should use the full path to the qmake binary matching the Qt version you want to use.

  • /home/izza/QcStyle/designer# /usr/local/Qt-5.12.2/bin/qmake -makefile -o makefile

    This is the path to qmake binary i am adding while building the project. No luck same error .
    Its looking for header file still/

  • ok i did it myself, it was not about qmake . Thanks anyways.

  • Lifetime Qt Champion

    What did you do yourself ?

  • Itwas path to the libaray missin , aded that in C++ file and it worked like a charm.

    Plus "Makefile" is the name when you execute qmake.
    keeping good care of the capitals and low letters

Log in to reply