using irrlicht with mingw

1k Views Asked by At

I'm using mingw-w64 (gcc 4.9.2)

I downloaded irrlicht I tried an example

C:\dev\irrlicht-1.8.1\irrlicht-1.8.1\lib\Win32-gcc>x86_64-w64-mingw32-g++ -I../ ../include/ -L. -lIrrlicht test.cpp C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ./l ibIrrlicht.a when searching for -lIrrlicht

C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ./I rrlicht.dll when searching for -lIrrlicht

C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible .\l ibIrrlicht.a when searching for -lIrrlicht

C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ./l ibIrrlicht.a when searching for -lIrrlicht

C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ./I rrlicht.dll when searching for -lIrrlicht

C:/Program Files (x86)/CodeBlocks/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mi ngw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lIrrlicht collect2.exe: error: ld returned 1 exit status

it seems the library Irrlicht.a provided isn't compatible with my compiler. so I tried to recompile the library as indicated in the Makefile, I ran mingw32-make win32 and then I get another error :

<builtin>: recipe for target 'zlib/adler32.o' failed
mingw32-make: *** [zlib/adler32.o] Error 1

can anybody help (note that I don't want to use vc++)

1

There are 1 best solutions below

0
On

the problem was the Irrlicht.a provided was a 32bit library where i was compiling for 64bits, so I had to use a 32bit compiler instead.