Installing SDL for a cross-compiler

Hi everyone,

I’m having some trouble installing SDL for use with a cross-compiler.
This is what I did:

downloaded Cygnus Mingw32 from www.devolution.com/~slouken/SDL/Xmingw32
unpacked it in /usr/local
set path to point to /usr/local/cross-tools/i386-mingw32/bin

in the SDL-1.1.2 directory:
./configure --host=i386-linux --target=i386-mingw32
make
make install

When I then run ‘./configure --host=… --target=…’ in the 'test’
directory,
and then ‘make’ it can’t find -lpthread. (when linking ‘checkkeys’)
(I can’t find any pthread libraries in the /cross-tools tree either)
When I (manually) remove the -lpthread from the Makefile, the linker
can’t find
about a dozen functions starting with SDL_, including SDL_init,
SDL_quit.

What am I doing wrong?

(SDL works fine when I don’t use the cross compiler, by the way)

Thanks,
Willem Jan

When I then run ‘./configure --host=… --target=…’ in the 'test’
directory,
and then ‘make’ it can’t find -lpthread. (when linking ‘checkkeys’)

It sounds like you have the Linux information cached.
Try:
rm config.cache; ./configure --host=… --target=… in the ‘test’ directory.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

It sounds like you have the Linux information cached.
Try:
rm config.cache; ./configure --host=… --target=… in the ‘test’ directory.

Thanks! That seemed to work :slight_smile:

I had to do the same thing in the main SDL directory, but now it builds
like a charm!
Only problem is I’ll have to reboot to see if the tests run :slight_smile:

Thanks again!

Willem Jan