PDA

View Full Version : Install QCA on Linux for Windows (mingw32 cross compiler)



huilui
24th September 2013, 00:13
Hi guys,

Hope somebody can help me out with this:

I have my Linux system set up with a cross compiler (mingw32) and a qt installation. For an application I now need to add on QCA support to that. I'm trying to install QCA using my cross compiler, but it always fails. Here are some more details on the steps I take and the errors I get:

Edit:
Forgot at first, that I also adjust some env variables:


export PKG_CONFIG_LIBDIR="/usr/i486-mingw32/lib/pkgconfig"
export PATH=$PATH:"/usr/i486-mingw32/bin"
unset PKG_CONFIG_PATH

Edit END

First I run the configure and adjust it for the cross compiler:

./configure --prefix=/usr/i486-mingw32 --bindir=/usr/i486-mingw32/bin --includedir=/usr/i486-mingw32/include --libdir=/usr/i486-mingw32/lib --datadir=/usr/i486-mingw32/share --disable-tests --release --certstore-internal

This works fine. It at first does complain, that:

Verifying Qt 4 build environment ... ./configure: Zeile 2170: .qconftemp/conf: File or Directory not found
Looking at the configure file, it seems like it checks for this file and then deletes it right away. So I commented out these three lines affected by that (could that possibly be all the problem??).

After the above adjustment, configure finishes without errors. Running make also runs quite smoothly, until it gives me a whole bunch of error messages:

i486-mingw32-g++ -Wl,-s -Wl,-subsystem,console -mthreads -o release/mozcerts.exe release/main.o -L'/usr/i486-mingw32/lib' -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
release/main.o: In function `ZN3QCA10TextFilterD1Ev':
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZTVN3QCA10TextFilterE'
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZN3QCA6FilterD2Ev'
release/main.o: In function `~TextFilter':
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZTVN3QCA10TextFilterE'
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZN3QCA6FilterD2Ev'
release/main.o: In function `ZN3QCA6Base64D1Ev':
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:232: undefined reference to `_imp___ZTVN3QCA6Base64E'
release/main.o: In function `~TextFilter':
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZTVN3QCA10TextFilterE'
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZN3QCA6FilterD2Ev'
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZTVN3QCA10TextFilterE'
/home/***/qca-2.0.3/tools/mozcerts/../../include/QtCrypto/qca_textfilter.h:51: undefined reference to `_imp___ZN3QCA6FilterD2Ev'
release/main.o: In function `main':
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:32: undefined reference to `_imp___ZN3QCA11InitializerC1ENS_10MemoryModeEi'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:116: undefined reference to `_imp___ZN3QCA11InitializerD1Ev'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:105: undefined reference to `_imp___ZN3QCA6Base64C1ENS_9DirectionE'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:106: undefined reference to `_imp___ZN3QCA6Base6420setLineBreaksEnabledEb'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:107: undefined reference to `_imp___ZN3QCA6Base6419setLineBreaksColumnEi'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:108: undefined reference to `_imp___ZN3QCA12MemoryRegionC1ERK10QByteArray'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:108: undefined reference to `_imp___ZN3QCA10TextFilter13arrayToStringERKNS_12M emoryRegionE'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:108: undefined reference to `_imp___ZN3QCA12MemoryRegionD1Ev'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:116: undefined reference to `_imp___ZN3QCA11InitializerD1Ev'
/home/***/qca-2.0.3/tools/mozcerts/main.cpp:108: undefined reference to `_imp___ZN3QCA12MemoryRegionD1Ev'
collect2: error: ld returned 1 exit status
make[3]: *** [release/mozcerts.exe] Fehler 1


And that's where I'm stuck. Googling didn't really produce any useful results to me. Anybody any hints/ideas?

Regards
huilui

Edit:
Some more details to my system and my set up: I'm using Linux (Arch Linux) 64 Bit. I have mingw32 installed with the gcc version 4.7.2 and qt 4.8. Compiling "normal" Qt4 apps on Linux for Windows works flawlessly.