SDL + Cygwin + X11 (NOT MinGW + DirectX)

Hi All,

As you no doubt already know [Wink] you can compile SDL on Cygwin.

I’m using Cygwin as a stand-in for a true Linux environment while working on a portable codebase. This makes writing portable code easier and testing quicker, since I don’t have to run back and forth between my Windows and Ubuntu machines, which are in separate rooms.

By default, the SDL configure script chooses the MinGW tool chain, which effectively compiles an SDL application as a true Win32 application using DirectX. While this is fine up to a point, I would prefer it to use the real GCC compiler and build a proper X11 application. MinGW is an ANSI/Win32 compiler (that is, Microsoft C++ compatible) and this creates a bunch of portability “black spots.”

Anyway, I was wondering how to force the configure script to set up SDL to use gcc + X server rather than defaulting to MinGW + Win32 + DirectX.

Thanks everyone in advance. Happy coding!

I think you’ll have to hack up the configure.in to do this. It should be
possible though, it’s just going to take a lot of fiddly work to get
everything to not assume Win32. :)On Mon, Mar 7, 2011 at 10:09 PM, msturner wrote:

Hi All,

As you no doubt already know [image: Wink] you can compile SDL on Cygwin.

I’m using Cygwin as a stand-in for a true Linux environment while working
on a portable codebase. This makes writing portable code easier and testing
quicker, since I don’t have to run back and forth between my Windows and
Ubuntu machines, which are in separate rooms.

By default, the SDL configure script chooses the MinGW tool chain, which
effectively compiles an SDL application as a true Win32 application using
DirectX. While this is fine up to a point, I would prefer it to use the real
GCC compiler and build a proper X11 application. MinGW is an ANSI/Win32
compiler (that is, Microsoft C++ compatible) and this creates a bunch of
portability “black spots.”

Anyway, I was wondering how to force the configure script to set up SDL to
use gcc + X server rather than defaulting to MinGW + Win32 + DirectX.

Thanks everyone in advance. Happy coding!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and CEO, Galaxy Gameworks

Sam Lantinga wrote:

I think you’ll have to hack up the configure.in (http://configure.in) to do this.? It should be possible though, it’s just going to take a lot of fiddly work to get everything to not assume Win32. :slight_smile:

Thanks Sam. I think at this point I’ll just persevere with the way it is set up now.

Wait a minute…Sam Lantinga? The man himself! Perhaps you could add this to your To Do list? [Wink]

Thanks again!