How to link 3rd party libraries?
-
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 1Emscripten 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 :(
-
They need to be static libraries, as shared libraries are not yet supported in Qt WebAssembly.
-
@lorn-potter any tips on how to do this? It's rather common for any real application to require more than just Qt.
@Vadi2 Did you build the libraries or just downloaded and used them directly ?
-
Any insights in this area would be appreciated! Any application big enough is bound to have dependencies.
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.