I want to compile wxWidgets 2.9.3 under ubuntu with g++ to produce 32 bits static libraries. But my OS is Ubuntu 64 bits. So, I use this cross compilation method given in the wiki page :
http://wiki.wxwidgets.org/Cross-Compili ... 64_machine
To achieve this, following the instruction, I use this configure command :
Code: Select all
../configure CC='gcc -m32' CXX='g++ -m32' --libdir=/usr/lib32 --disable-shared
Then, I run make.
I've got the following error when producing wxrc :
I understand the problem: when using -ldl, g++ is searching for the standard library stdc++ into my /usr/lib/gcc/x86_64-linux-gnu/4.6.1/ directory, but this one is the 64 bits one.g++ -m32 -o wxrc wxrc_wxrc.o -L/home/zzzz/Applications/wxWidgets-2.9.3/build32/lib -pthread -lwx_baseu_xml-2.9 -lexpat -lwx_baseu-2.9 -lwxzlib-2.9 -lwxregexu-2.9 -pthread -ldl -lm -ldl -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libstdc++.a when searching for -lstdc++
How tell g++ to take the 32 bits, giving the fact I don't know where it is ? Maybe I missed something in the configure step, could you help me please ?
Thanks to all.
Bye.