Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to configure Qt Creator with emscripten compiler?
Forum Updated to NodeBB v4.3 + New Features

How to configure Qt Creator with emscripten compiler?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 5.2k 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.
  • J Offline
    J Offline
    Jose Bento
    wrote on 9 Oct 2018, 13:47 last edited by Jose Bento 10 Oct 2018, 14:08
    #1

    I downloaded the Qt5.12 beta and follow the wiki page https://wiki.qt.io/Qt_for_WebAssembly#Building_Qt.
    But, now I would like to configure the Qt creator with emscripten.

    How to configure those tabs:
    Tools->Options->Kits(Options)->compiler
    Tools->Options->Kits(Options)->Qt versions
    I included the qmake /home/Qt/5.12.0/Srcqtbase/bin/qmake
    Tools->Options->Kits(Options)->kits
    0_1539180211370_fb2ef26e-3c30-41e9-b0fa-a35593d951db-image.png

    Doesn´t matter which compiler you use. It always use emcc/em++. I think this is caused by Qt mkspec.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Andy Pelawi
      wrote on 23 Apr 2019, 03:13 last edited by
      #2

      I have follow the instruction from https://gist.github.com/blockspacer/698fbca13c01ab977256849daa6cc084
      Compiled folder for my Qt-Wasm : ~/qt5
      and emscripten: ~/emsdk/emscripten/1.38.30
      for sample project : ~/qt-webassembly-examples
      And everything work well.

      I use fedora 29 and Qt 5.12. And for Qt Creator I use these configuration:

      1. Option->CMake , add the new configuration :
        Name: System Make at /usr/bin/make
        Path: /usr/bin/make

      2. Option->Compilers, Add->Custom->C and C++
        For C
        Name: EMCC
        Compiler Path: ~/emsdk/emscripten/1.38.30/emcc
        Make Path: /usr/bin/make
        ABI: x86 - linux - generic - elf - 64bit

        For C++
        Name: EMCC
        Compiler Path: ~/emsdk/emscripten/1.38.30/em++
        Make Path: /usr/bin/make
        ABI: x86 - linux - generic - elf - 64bit

      3. Option->Qt Versions, Add new configuration
        Version name: Qt %{Qt:Version} (qt5) wasm-emscripten
        qmake location: ~/qt5/qtbase/bin/qmake

      4. Option->Kits, Add new configuration
        Name: emscripten
        File system name: leave empty
        Compiler: C: EMCC, C++: EM++
        Qt Version: choose from we filled before (Qt %{Qt:Version} (qt5) wasm-emscripten), in my system is : Qt 5.12.3 (qt5) wasm-emscripten
        Qt mkspec: leave empty
        CMake Tool: System Make at /usr/bin/make

      Now try "Run qmake" on project than "Build"
      The project builder maybe at build- {project_name}-emscripten-Debug/Profile/Release.
      Go to that folder from terminal, and run using "python -mSimpleHTTPServer"

      don't forget to set kit Build&Run Setting into "emscripten"
      for test project i use the project "gui_multicanvas", u can open it from qt creator.

      1 Reply Last reply
      3

      • Login

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