Unsolved mxe and quazip
-
Hi, it's my first time cross-compiling with Qt (from linux to windows). I found mxe useful for building Qt, it does not have the quazip package though. I built it from source using mxe's mingw32, so now I have both quazip.a and quazip.so in the same directory. I figured if the linker can find the .so, it should find the .a, but when I compile my app for windows I get a bunch of undefined references about Quazip. Does anyone have an idea what's happening?
My project file is a bit messy from trying different things to make it work, but here it is: http://pastebin.com/aUj962tv (still compiles fine for linux)
-
I have used quazip but I don't know what 'mxe' is. This is from your project file:
LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip -lquazip -lz
shouldn't this be:
LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip -lquazip -lzlib
I am not sure what the definition 'QUAZIP_STATIC' does. If the idea is to statically link to your program you might want to investigate this a bit.
CONFIG: DEFINES += QUAZIP_STATIC
-
@Rondog said in mxe and quazip:
shouldn't this be:
LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip -lquazip -lzlib
Thanks, I changed it.
I am not sure what the definition 'QUAZIP_STATIC' does. If the idea is to statically link to your program you might want to investigate this a bit.
CONFIG: DEFINES += QUAZIP_STATIC
This was for when I tried to add all the quazip files directly to my project. I forgot why that didn't work.
I found a fork which seems to have support for quazip, if that doesn't work I'll try adding adding the quazip source files to my project again.
Edit:
I used the command "nm -an libquazip.a | c++filt |grep ZN6QuaZipC1ERK7QString" and I gotU __ZN6QuaZipC1ERK7QString 000005d0 T __ZN6QuaZipC1ERK7QString U __ZN6QuaZipC1ERK7QString
and the errors I get look like
undefined reference to `_imp___ZN6QuaZipC1ERK7QString'
After a quick search I found out that imp_ is used for shared libraries, so ld is looking for shared symbols in a static lib?
-
I gave up, borrowed my parent's laptop with windows, installed mingw and qt, compiled quazip and my project. If anyone has tipsfor cross-compiling with quazip, it would be appreciated.