Search code examples
gcccygwinsdl

Install SDL on Cygwin 2.3.1


I am trying to install a SDL library on cygwin following this guide:

http://www.noquarterarcade.com/using-cygwin-for-sdl-development

Unfortunately building the SDL does not work - error message:

Your compiler (gcc) does not produce Win32 executables!

Apparently my compiler has the wrong version. How can I set it to version 3? Or, if this is a bad idea, how should I setup SDL on my cygwin?

I am not too much of a crack so I would appreciate rather simple answers :-)

Thank you so much in advance.

Cygwin version: 2.3.1

gcc version: 4.9.3

Tried to install SDL 1.2.15 (should I install a newer version? How?)

Edit:

Downloaded and installed SDL following this path:

hg clone https://hg.libsdl.org/SDL SDL
cd SDL
mkdir build
cd build
../configure

old error is gone but got a new error:

$ ../configure
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes

...

checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in '/home/SDL/build':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See 'config.log' for more details

This should tell me that I am missing a C++ Compiler I guess. But I've installed gcc 4.9.3


Solution

  • Finally found an answer: The gcc-core package and gcc-g++ are not of the same version.