Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt WebAssembly: Porting Current Qt C++ project to web assembly
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Izza
    wrote on 10 Apr 2019, 14:59 last edited by
    #1

    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

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Apr 2019, 20:55 last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Izza
        wrote on 11 Apr 2019, 07:43 last edited by
        #3

        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
        root@FAUNUS:/home/izza/qt-webassembly-examples/QcStyle/designer#

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Izza
          wrote on 11 Apr 2019, 14:01 last edited by Izza 4 Nov 2019, 14:02
          #4

          this is my designer.pro

          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

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 11 Apr 2019, 19:59 last edited by
            #5

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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • I Offline
              I Offline
              Izza
              wrote on 12 Apr 2019, 07:56 last edited by
              #6

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

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

              1 Reply Last reply
              0
              • I Offline
                I Offline
                Izza
                wrote on 12 Apr 2019, 08:14 last edited by
                #7

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

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 12 Apr 2019, 20:54 last edited by
                  #8

                  What did you do yourself ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    Izza
                    wrote on 16 Apr 2019, 12:44 last edited by Izza
                    #9

                    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

                    1 Reply Last reply
                    0

                    1/9

                    10 Apr 2019, 14:59

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved