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. How to link 3rd party libraries?
Forum Updated to NodeBB v4.3 + New Features

How to link 3rd party libraries?

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
8 Posts 3 Posters 1.3k Views 3 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.
  • V Offline
    V Offline
    Vadi2
    wrote on last edited by
    #1

    I'm getting this at the end of my compile:

    shared:WARNING: emcc: cannot find library "lua5.1"
    shared:WARNING: emcc: cannot find library "hunspell"
    shared:WARNING: emcc: cannot find library "pcre"
    shared:WARNING: emcc: cannot find library "zip"
    shared:WARNING: emcc: cannot find library "z"
    shared:WARNING: emcc: cannot find library "pugixml"
    error: Linking globals named 'regerror': symbol multiply defined!
    shared:WARNING: Note: Input file "@/tmp/tmpfsjXvo.response" did not exist.
    shared:ERROR: Failed to run llvm optimizations: 
    Makefile:1354: recipe for target 'mudlet.js' failed
    make: *** [mudlet.js] Error 1
    

    Emscripten has documentation on it here, but... how does that related to Qt? Qt docs also don't mention 3rd party libraries, so it's not entirely clear on what to do :(

    1 Reply Last reply
    0
    • lorn.potterL Offline
      lorn.potterL Offline
      lorn.potter
      wrote on last edited by
      #2

      They need to be static libraries, as shared libraries are not yet supported in Qt WebAssembly.

      Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
      Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

      1 Reply Last reply
      2
      • V Offline
        V Offline
        Vadi2
        wrote on last edited by
        #3

        Thanks! I have no experience building static libraries, any tips on how to get started?

        If I understand correctly, I can just build the library statically with my Qt application - I don't have to build Qt statically as well?

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vadi2
          wrote on last edited by
          #4

          @lorn-potter any tips on how to do this? It's rather common for any real application to require more than just Qt.

          Pradeep P NP 1 Reply Last reply
          0
          • V Vadi2

            @lorn-potter any tips on how to do this? It's rather common for any real application to require more than just Qt.

            Pradeep P NP Offline
            Pradeep P NP Offline
            Pradeep P N
            wrote on last edited by
            #5

            @Vadi2 Did you build the libraries or just downloaded and used them directly ?

            Pradeep Nimbalkar.
            Upvote the answer(s) that helped you to solve the issue...
            Keep code clean.

            1 Reply Last reply
            1
            • V Offline
              V Offline
              Vadi2
              wrote on last edited by
              #6

              On Windows we build them, on Ubuntu we install the -dev packages, on macOS we use Homebrew.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Vadi2
                wrote on last edited by
                #7

                Any insights in this area would be appreciated! Any application big enough is bound to have dependencies.

                lorn.potterL 1 Reply Last reply
                0
                • V Vadi2

                  Any insights in this area would be appreciated! Any application big enough is bound to have dependencies.

                  lorn.potterL Offline
                  lorn.potterL Offline
                  lorn.potter
                  wrote on last edited by
                  #8

                  @Vadi2

                  Other than adding your libs with LIBS += -lblahblah
                  you shouldn't have to pass anything extra to Qt to get it to link statically, as QtWebAssembly does that anyway.

                  You could try QMAKE_LFLAGS += -static in your project if there is any issues, or it tries to link dynamically.

                  Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
                  Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

                  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