Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

add static library



  • Hello,
    I have used a bit Qt for WebAssembly in order to create some simple web applications, but now I am willing to add some external (static) libraries.
    I have created a simple .h and .cpp pair of files with only one function inside and using emcc I created a static library .a file.
    i created the library using:

    emcc hello.c -o library.a
    

    I added it into Qt by adding into .pro file the path to the lib and the lib name, also the header file.
    When trying to build the application I am getting errors becasue there is an undefined symbol, my function from the static library.
    It seems that the library is not used (or valid) or during the creation of the library something is missing.

    Can someone show us the right way of creating static libraries that can be added to Qt for WebAssembly?

    Best regards



  • using the latest emscripten version 1.39.11 seems to work as expected


Log in to reply