2010-07-16 95 views
0

GCC編譯時,我主要是以下這個指南在Windows上編譯GCC:「反斜線不就行了最後一個字符」在Windows

http://www.aristeia.com/Misc/gcc4ForWindows.html

不同的是,我使用MSYS 1.10,並試圖從SVN構建gcc中繼。源碼樹在Linux上編譯得很好,但是當我嘗試在Windows上構建時,運行配置腳本時出現以下錯誤。我使用

<snip> 
checking where to find the target windmc... host tool 
checking whether to enable maintainer-specific portions of Makefiles... no 
checking whether -fkeep-inline-functions is supported... yes 
c:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C' 
configure: creating ./config.status 
config.status: creating Makefile 
gawk: ./conf6456-2346/subs.awk:19: S["FLAGS_FOR_TARGET"]=" -L$$r/$(TARGET_SUBDIR 
)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/ming 
w/include -isystem $$s/winsup/w32api/include -"\ 
gawk: ./conf6456-2346/subs.awk:19: 

             ^backslash not last character on 
line 
c:\MinGW\bin\sed.exe: couldn't write 38 items to stdout: No error 
config.status: error: could not create Makefile 
c:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'  

命令行是這樣的:

../configure前綴= C:/ rosbe/i586的--build = mingw32的主機=的mingw32 --target =的mingw32 - -enable-languages = c,C++ --disable-win32-registry --enable-sjlj-exceptions --enable-threads = win32 --enable-checking = release

回答

0

我解決了這個問題。

尋找這裏:Problem compiling freetype2 with MinGW/MSYS

我注意到,我也曾經有過同樣的錯誤。

事實證明,我安裝了MinGW,它出現在我的$ PATH安裝msys之前。我解決了這個問題,現在正在編譯。

0

Scott Meyers的文章已經過時了, gcc4二進制文件終於在Windows上可用。只需前往MinGW網站並下載它們。

+0

但他們沒有gcc 4.6 – Raindog 2010-08-16 22:31:42

+0

GCC 4.6未發佈。無論如何,如果你想擁有一個最新的GCC,那麼4.5或4.4就足夠了。另一方面,如果你的目標是專門在MinGW上建立GCC中繼,那麼我的答案是沒有用的。 – 2010-08-17 04:56:24