문제

I've downloaded MinGW from this link x64-4.8.1-posix-sjlj-rev1 but when I try to build for x86 target I've lots of linkage errors... seems that only x64 lib are installed...

I've need to build for x86 and x64 platforms on windows... Have I to download both x64 and x86 or are some simpler ways?

Edit I'm using eclipse keplero as IDE I've tryed to build myself a simple hello world program with g++ -m32 -std=c++11 test.cpp -o test32.exe and g++ -m64 -std=c++11 test.cpp -o test64.exe. And all is ok... So the problem was with eclipse... After a little a discovered that I need to use MYSY ( set in PATH ) and set -m32 also in the c++ linkage options...

Now all is fine.

I've also tryed to use NetBeans C++ as IDE... seems a gread IDE!!!

도움이 되었습니까?

해결책

It is not multilib enabled. That's why you are not able to compile 32-bit(x86) program. You can get multilib enabled toolchain from following link:

For 64-bit machine: 64-Bit

For 32-bit machine: 32-Bit

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top