How to link 3rd party libraries?
-
wrote on 3 Oct 2019, 16:02 last edited by
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 :(
-
wrote on 4 Oct 2019, 00:40 last edited by
They need to be static libraries, as shared libraries are not yet supported in Qt WebAssembly.
-
wrote on 4 Oct 2019, 05:32 last edited by
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?
-
wrote on 11 Oct 2019, 07:35 last edited by
@lorn-potter any tips on how to do this? It's rather common for any real application to require more than just Qt.
-
@lorn-potter any tips on how to do this? It's rather common for any real application to require more than just Qt.
wrote on 11 Oct 2019, 08:09 last edited by@Vadi2 Did you build the libraries or just downloaded and used them directly ?
-
wrote on 11 Oct 2019, 08:25 last edited by
On Windows we build them, on Ubuntu we install the
-dev
packages, on macOS we use Homebrew. -
wrote on 26 Oct 2019, 15:57 last edited by
Any insights in this area would be appreciated! Any application big enough is bound to have dependencies.
-
Any insights in this area would be appreciated! Any application big enough is bound to have dependencies.
wrote on 31 Oct 2019, 19:49 last edited byOther 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.