Jason (jcreed) wrote,

Cygwin discovery of the day.

If you ever find yourself wanting to build SDL under cygwin to use X11 rather than native Windows windows, first of all, God help you, second of all, the following may work:

Get the SDL source distribution.
Edit the configure script by grepping for "Win9x" and changing the line above it
to be "*)" rather than "cygwin* | mingw*)".
./configure --build=i686-linux --host=i686-linux --with-x --enable-joystick=no --enable-cdrom=no
make install

The critical trick seems to be lying to the build system and saying you're on i686-linux rather than i686-cygwin. The bizarre-looking edit above is to keep the windows workaround for a configuration test that is known to mysteriously blow up on windows.

Then a typical compile line might look like

gcc -I /usr/local/include/SDL -L /usr/local/lib sdlapp.c -lSDL -lX11 -lXext -lXrandr -lesd

I used http://friedspace.com/SDLTest.c as a quick test.

You might need to install whatever cygwin package installs esd, the sound daemon. And maybe the other X packages. I seemed to have them already.
Tags: cygwin, sdl

  • (no subject)

    After getting home from work immediately appeared to be a traintastrophe in the making, went to see Esther Schor talk about her book "Bridge of…

  • (no subject)

    Thai curry leftovers for dinner. Got a copy of Hennessy and Patterson's textbook on Architecture, and I am enjoying catching up on all the low-level…

  • (no subject)

    Finally the end is in sight for unpacking my books. Heartstrings are pulled over the desire to slim down and get rid of some of them, but so many are…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded