[SDL] How can I cross compile SDL DLL?

Ray Kelm rhk at newimage.com
Wed Jun 14 21:30:16 PDT 2000


Sam Lantinga wrote:
> 
> > Apparently, libtool can be coerced to do the right thing, but not
> > using automake. So rather than hacking automake and libtool, which
> > are the nastiest things I've ever seen, I was thinking of making
> > a Makefile.mingw.in which configure can munge. Or possibly
> > a crossbuild.sh.in file. If I create such a thing for, say,
> > SDL, SDL_mixer, SDL_image, SDL_ttf (all the ones I'm interested
> > in), would you consider including them with the main distribution?
> > I'd do my best to make sure they will be easy to maintain.
> 
> Sure, that sounds great. :)
> 
> Maybe even take the .a archive created by the cross automake stuff
> and generate a .dll from it?  You'd still need the export list I
> suppose, and this can be found in any of the src/main/*/export
> directories.  ... Just a thought.
> 
> See ya!
>         -Sam Lantinga, Lead Programmer, Loki Entertainment Software

I switched tactics on this one. I've patched libtool 1.3.4 to
"do the right thing" for windows DLLs. The only problem left 
is with DLLs that export DATA symbols, which requires you do 
hand-make a def file. My last attempt to allow an optional def 
file resulted in breaking normal builds.

My patched libtool is in the SDL_gui project. When I get 
everything working I'll probably split out the patch and post 
it someplace seperately.

So far, I have been able to successfully cross compile SDL, 
SDL_image, and SDL_ttf, as well as my SDL_gui library.

The only difference I've noticed is that the resulting DLLs 
use CRTDLL instead of MSVCRT. I don't know if that will be
a problem.

-Ray



More information about the SDL mailing list