在 Cygwin 2.3.1 上安装 SDL

Install SDL on Cygwin 2.3.1

我正尝试按照本指南在 cygwin 上安装 SDL 库:

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

不幸的是,构建 SDL 不起作用 - 错误消息:

Your compiler (gcc) does not produce Win32 executables!

显然我的编译器版本有误。如何将其设置为版本 3? 或者,如果这是个坏主意,我应该如何在我的 cygwin 上设置 SDL?

我不是太菜所以我希望能得到简单的答案:-)

在此先感谢您。

Cygwin 版本:2.3.1

gcc 版本:4.9.3

已尝试安装 SDL 1.2.15(我应该安装较新的版本吗?如何安装?)

编辑:

已按照以下路径下载并安装 SDL:

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

旧错误已消失,但出现新错误:

$ ../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

这应该告诉我,我想我缺少一个 C++ 编译器。但是我已经安装了 gcc 4.9.3

终于找到答案了: gcc-core包和gcc-g++不是同一个版本