我想在MacOSX 10.6上使用gcc 4.7建立一個名爲Ogre3d v1.8的庫。我試圖從MacPorts和gFortran網頁安裝gcc版本。兩者都有相同的問題,我無法在互聯網上找到關於此的很多信息。食人魔構建海灣合作委員會4.7
我的問題是,我得到這個錯誤:
Scanning dependencies of target OgreMain
[ 0%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o
In file included from /usr/local/gcc-4-7-svn/lib/gcc/x86_64-apple-darwin10/4.7.0/include/c++/bits/postypes.h:42:0,
from /usr/local/gcc-4-7-svn/lib/gcc/x86_64-apple-darwin10/4.7.0/include/c++/bits/char_traits.h:42,
from /usr/local/gcc-4-7-svn/lib/gcc/x86_64-apple-darwin10/4.7.0/include/c++/string:42,
from /Users/parwrange/Desktop/ogre/ogre_src_v1-8-1/OgreMain/include/OgrePrerequisites.h:33,
from /Users/parwrange/Desktop/ogre/ogre_src_v1-8-1/OgreMain/include/OgreArchive.h:31,
from /Users/parwrange/Desktop/ogre/ogre_src_v1-8-1/OgreMain/include/OgreStableHeaders.h:41,
from /Users/parwrange/Desktop/ogre/ogre_src_v1-8-1/OgreMain/src/OgreAlignedAllocator.cpp:28:
/usr/local/gcc-4-7-svn/lib/gcc/x86_64-apple-darwin10/4.7.0/include/c++/cwchar:46:19: fatal error: wchar.h: No such file or directory
compilation terminated.
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2
在它看起來像頭文件wchar.h丟失等字樣。
我已經能夠使用gcc 4.7安裝構建其他庫。所以我猜測這是Ogre3d v1.8特有的東西。可能與包含順序有關。但由於我遇到問題時發現其他人遇到這個問題,我希望這裏的某個人有一些關於如何做的好的提示。