When trying to cross-compile the mixer library for Windows using my Linux
box, I followed the SDL-1.0.0 “README.Win32”'s directions:
Go to the directory containing the demo you want to build and type:
./configure --target=mingw32 ; make
But when I do that, I get this error:
checking host system type... ./config.guess: ./dummy: cannot execute \
binary fileconfigure: error: can not guess host type; you must specify one
So, of course, I add a “–host=” to the arguments:
% ./configure --host=i386-linux --target=mingw32
“./configure” finishes with no errors, so I try to “make”:
% make
But after a lot of compiling, I end up with this error when it tries to create
the “playwave” program:
/usr/local/lib/libSDL.so: file not recognized: File format not recognized
make[1]: *** [playwave] Error 1
make[1]: Leaving directory `/home/kendrick/tmp/mixer-1.0.0'
make: *** [all-recursive] Error 1
Ok, so now I try giving it some more information to try to get rid of that
error:
% ./configure --host=i386-linux --target=mingw32 \
--prefix=/usr/local/cross-tools/i386-mingw32/ \
--with-sdl-prefix=/usr/local/cross-tools/i386-mingw32/
Does that look right??? (BTW, of course I run “make distclean” before
running “./configure” again…)
But guess what!? After running “make”, I get the same error!!!
/usr/local/lib/libSDL.so: file not recognized: File format not recognized
Why the heck is it insisting on looking in “/usr/local/lib/” for “libSDL.so”!?
I specifically told it, when I ran “./configure”, that SDL stuff is inside
"/usr/local/cross-tools/i386-mingw32/"!!!
And the stuff IS there, see?
% cd /usr/local/cross-tools/i386-mingw32/lib/
% ls -l libSDL*
-rw-r--r-- 1 root 4792284 Dec 16 22:36 libSDL.a
-rw-r--r-- 1 root 640 Dec 16 22:36 libSDL.la
-rw-r--r-- 1 root 203332 Dec 16 22:36 libSDLmain.a
What am I doing wrong here!?
Thanks!
Frustratedly yours,
-bill!