我正在尝试按照本指南在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
答案 0 :(得分:1)
终于找到了答案: gcc-core包和gcc-g ++的版本不同。