Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. add static library
Forum Update on Monday, May 27th 2025

add static library

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
2 Posts 1 Posters 619 Views
  • 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.
  • R Offline
    R Offline
    radu022003
    wrote on 8 Jun 2020, 09:44 last edited by
    #1

    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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      radu022003
      wrote on 15 Jun 2020, 10:42 last edited by
      #2

      using the latest emscripten version 1.39.11 seems to work as expected

      1 Reply Last reply
      0

      • Login

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