2013-10-31 84 views
1

我試圖編譯最新版本的SDL,SDL版本2.0.1。我嘗試從Mercurial編譯SDL。SDL 2.0.1 Linux編譯錯誤

checking for working volatile... no 
checking for GCC -MMD -MT option... no 
checking for ANSI C header files... (cached) yes 
checking for sys/types.h... (cached) yes 
checking stdio.h usability... no 
checking stdio.h presence... no 
checking for stdio.h... no 
checking for stdlib.h... (cached) yes 
checking stddef.h usability... no 
checking stddef.h presence... no 
checking for stddef.h... no 
checking stdarg.h usability... no 
checking stdarg.h presence... no 
checking for stdarg.h... no 
checking malloc.h usability... no 
checking malloc.h presence... no 
checking for malloc.h... no 
checking for memory.h... (cached) yes 
checking for string.h... (cached) yes 
checking for strings.h... (cached) yes 
checking for inttypes.h... (cached) yes 
checking for stdint.h... (cached) yes 
checking ctype.h usability... no 
checking ctype.h presence... no 
. 
. 
. 
. 
checking dbus/dbus.h usability... no 
checking dbus/dbus.h presence... no 
checking for dbus/dbus.h... no 
checking for Linux 2.4 unified input interface... no 
checking for Linux kd.h... no 
checking for Touchscreen library support... no 
config.status: creating SDL2.spec 
config.status: creating sdl2.pc 
config.status: creating include/SDL_config.h 
config.status: executing libtool commands 

我接收的./configure沒有的噸,當我試圖運行,使其顯示此消息:

Makefile:226: *** missing separator. Stop. 

所有與下列消息執行./configure時,似乎罰款消息背後的原因是什麼?有誰知道修復?

+0

您的系統不適合編譯源代碼。通過'檢查GCC -MMD -MT選項......否'你可能甚至沒有gcc。在這種情況下,很難說出爲什麼要編譯SDL。安裝編譯器和相應的開發庫(最終會有很多這樣的庫) – keltar

+0

是否安裝了編譯SDL所需的要求?又名'apt-get install build-essential'在debian上就像系統 – Mali

+0

我已經安裝了build-essential及其最新版本。 GCC也安裝。 –

回答

3

我剛剛有同樣的問題(到tee),這是對我有用。

我把未壓縮的文件夾放到另一個文件夾中,它的名字中有一個空格,在我的例子中是一個名爲「SDL 2.0」的文件夾。當使用configure命令時,它導致它將make文件中的文件位置拆分爲兩行,第一行出現在第226行。爲了解決這個問題,我使用下劃線重命名了有問題的文件夾,所以「SDL_2.0」。然後,我可以再次使用configure命令,並在此之後更新的make文件起作用。

TLDR:在文件名中使用下劃線而不是空格。

1

我有同樣的問題,這是對我工作:

安裝SDL之前安裝以下庫:

sudo apt-get install build-essential mercurial make cmake autoconf 
automake \ 
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \ 
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \ 
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \ 
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev 

之後,你可以運行./configuremakemake install就好了。 注意:我從SDL源代碼隨附的README.txt文件中獲得的所有這些信息,因此您需要習慣在嘗試任何操作之前閱讀這些文件。我希望它有幫助。