2013-07-23 188 views
1

我想爲Cygwin編譯GCC並支持針對i386-elf,因此我可以編譯一些簡單的操作系統(搜索Benu,由l30nard0在Github上)。我已經成功編譯了i386-elf的binutils,並編譯了所有GCC的浮點數依賴項。在Cygwin上編譯GCC 4.7.3以支持i386-elf

問題是,它說windows.h找不到。我確實已經成功安裝了w32api,並嘗試在GCC的包含路徑中逐個包含每一個,但它們都不起作用。如果我嘗試其中任何一種,我會得到很多錯誤和警告,並不是所有的錯誤和警告都會顯示在Cygwin控制檯中。如果不是全部的話,數十個警告中的幾十個是大多數unused parameter

有誰知道問題出在哪裏?

我已經浪費了我生命中最後三天的時間,試圖讓Linux Mint設置所有我想要的東西,但由於我不想進入的原因,我放棄了這一點。我希望能夠得到一件事情,以便我可以再次享受我的生活。 :) 謝謝!

順便說一句:我使用的配置參數是--target=i386-elf --enable-threads=win32 --enable-languages=c,c++我是否應該用--enable-targets來代替?

而這裏的日誌的一部分:

In file included from ../../../gcc/libgcc/gthr.h:150:0, 
      from ../../../gcc/libgcc/unwind-dw2.c:38: 
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory 
compilation terminated. 
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed 
make[2]: *** [unwind-dw2.o] Error 1 
make[2]: *** Waiting for unfinished jobs.... 
In file included from ../../../gcc/libgcc/gthr.h:150:0, 
      from ../../../gcc/libgcc/unwind-dw2-fde.c:38: 
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory 
compilation terminated. 
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2-fde.o' failed 
make[2]: *** [unwind-dw2-fde.o] Error 1 
make[2]: Leaving directory '/home/Sean/gccbuild/i386-elf/libgcc' 
Makefile:10055: recipe for target 'all-target-libgcc' failed 
make[1]: *** [all-target-libgcc] Error 2 
make[1]: Leaving directory '/home/Sean/gccbuild' 
Makefile:870: recipe for target 'all' failed 
make: *** [all] Error 2 

回答

1

取出--enable-threads=win32標誌;它旨在指定目標系統上的線程支持,而不是構建系統。

+0

謝謝!我擺脫了這一點,但其他許多問題出現了,但我修復了所有問題! –