2015-11-30 107 views
0

我想這個指南在Cygwin上安裝SDL庫:在Cygwin安裝SDL 2.3.1

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

回答

1

終於找到了答案: gcc-core包和gcc-g ++版本不一樣。

+1

我得到了同樣的問題 - 非常感謝你:) –