SDL on Cygwin

Has anyone been able to build SDL 1.2.15 on Cygwin? I tried ./configure
and got back:
Your compiler ($CC) does not produce Win32 executables!
Are there any special configure settings I should use for Cygwin?

Thanks.

Sincerely,
Laura

I think you just have to set gcc to version 3. Check out these instructions.

http://www.noquarterarcade.com/using-cygwin-for-sdl-developmentOn Wed, May 2, 2012 at 11:28 AM, LM wrote:

Has anyone been able to build SDL 1.2.15 on Cygwin?? I tried ./configure and
got back:
Your compiler ($CC) does not produce Win32 executables!
Are there any special configure settings I should use for Cygwin?


Todd Steinackle
http://www.noquarterarcade.com/

Thanks.

Sincerely,
Laura


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

LM writes:

Has anyone been able to build SDL 1.2.15 on Cygwin?? I tried ./configure and got back:
Your compiler ($CC) does not produce Win32 executables!
Are there any special configure settings I should use for Cygwin?

I would mimic what is already done for Cygports,

http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/SDL;a=tree

i.e., apply those two patches (they are for 1.2.14 but SDL shouldn’t
have changed too much since then) and use the same configuration options
as used in the SDL-1.2.14-2.cygport file.

Regards,–
Alberto

Alberto Luaces writes:

LM writes:

Has anyone been able to build SDL 1.2.15 on Cygwin?? I tried ./configure and got back:
Your compiler ($CC) does not produce Win32 executables!
Are there any special configure settings I should use for Cygwin?

I would mimic what is already done for Cygports,

http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/SDL;a=tree

i.e., apply those two patches (they are for 1.2.14 but SDL shouldn’t
have changed too much since then) and use the same configuration options
as used in the SDL-1.2.14-2.cygport file.

I forgot one thing: if you really wanted just a native windows library,
without having a X server to display the graphics, cygwin has the
mingw64 compiler already packaged. Just download it with setup.exe and
specify a cross-compilation to the configure script by setting your
host.–
Alberto

Alberto Luaces wrote:

I would mimic what is already done for Cygports,

http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/SDL;a=tree

Thank you so much. The patches to configure.in and SDL_x11gl.c work.
Needed to leave out the patch to SDL_platform.h. (I applied the patches by
hand in the proper locations. I didn’t attempt to patch the files directly
with the patch program.) After patching, I can run ./autogen.sh,
configure, make, make install and everything works. I now have an
automated bash script for building SDL on Cygwin. Was able to build
pdcurses using SDL and it runs in Cygwin (unlike the native Windows and X11
versions).

Really appreciate the pointer to get me started in the right direction.

Sincerely,
Laura
http://www.distasis.com/cpp

LM writes:

Alberto Luaces wrote:

I would mimic what is already done for Cygports,

http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/SDL;a=tree

Thank you so much. The patches to configure.in and SDL_x11gl.c work.
Needed to leave out the patch to SDL_platform.h. (I applied the patches by
hand in the proper locations. I didn’t attempt to patch the files directly
with the patch program.) After patching, I can run ./autogen.sh,
configure, make, make install and everything works. I now have an
automated bash script for building SDL on Cygwin. Was able to build
pdcurses using SDL and it runs in Cygwin (unlike the native Windows and X11
versions).

Really appreciate the pointer to get me started in the right direction.

I’m glad you sorted it out; I think your experience is valuable for the
community.

Regards,–
Alberto

I feel that one needs to distinguish between porting to Cygwin using WIN32
API (symbolized by the use of the -mwin32 flag with gcc) or without (which
seems to be the general approach in cygwinports, so X11 seems to be used for
graphics there). Since my use-case is the former (cygwin+WIN32) I made a
different and smaller set of changes to SDL-1.2.15 (attached) and
built/tested as follows:

  • Installed directx-devel.tar.gz as per
    http://www.libsdl.org/extras/win32/cygwin/README.txt (gl.h was in my current
    Cygwin installation!)
  • Applied attached patch
  • Did ./autogen.sh
  • Configured with ./configure --enable-stdio-redirect=no
  • Built and installed with make; make install
  • I built the tests and tried those that seemed most significant (also
    testing threading, loadinhg-libraries), which all worked
  • I built ffmpeg (development snapshot of about July 30) and ffplay - and
    ffplay worked, which was actually the whole point of the exercise. Don’t try
    this yourself (yet) though because ffmpeg needs a couple fo changes for
    cygwin, too, and I have not submitted them yet!

BTW: I may not be posting this in the right way by sendin to the
mailing-list but I was unable to post to the forum. I got the message …
Sorry, but only users granted special access can reply to posts in this
forum
… and was unable to send a private message to the moderator:-( Anyway,
sorry if I did not follow all the rules - but I will be glad to follow
instructions by more experienced users of this list/forum;-)

Regards, Martin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-1.2.15-cygwin.diff
Type: application/octet-stream
Size: 2492 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20121001/663b6d88/attachment.obj

BTW: I may not be posting this in the right way by sendin to the
mailing-list but I was unable to post to the forum. I got the message …
Sorry, but only users granted special access can reply to posts in this
forum
… and was unable to send a private message to the moderator:-( Anyway,
sorry if I did not follow all the rules - but I will be glad to follow
instructions by more experienced users of this list/forum;-)

Check the welcome topic:
http://forums.libsdl.org/viewtopic.php?t=5973

The mailing list seems to be better for SDL discussion anyway.