更新:
最终我通过重新安装命令行工具解决了问题,可以参考这个链接。 对于造成的不便,我非常抱歉!
最初的问题:
我刚升级到OSX Mavericks,现在编译器无法正常工作了。 我之前一直使用macports中的gcc48、vim/sb2等工具,一切都很顺利。现在只要我包含任何库文件,编译就会报错。我没有太多经验,不知道该怎么做,也不知道该搜索什么。我只想让它像以前一样正常工作。以下是编译基本的“hello world”程序时出现的错误信息:
In file included from /opt/local/include/gcc48/c++/bits/postypes.h:40:0,
from /opt/local/include/gcc48/c++/iosfwd:40,
from /opt/local/include/gcc48/c++/ios:38,
from /opt/local/include/gcc48/c++/ostream:38,
from /opt/local/include/gcc48/c++/iostream:39,
from ceva.cpp:1:
/opt/local/include/gcc48/c++/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
如果你需要任何信息,请告诉我,我会向你提供。感谢您的耐心!
cd /Library/Developer/CommandLineTools/Packages/
然后open .
再双击pkg。 - Anti Earth