我使用mac和clang作为我的默认编译器。有一天有人不小心删除了我的一个库并导致我的环境崩溃......现在当我执行clang ++时,我的终端上出现了很多错误信息,说:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:101:9: error:
no member named 'div_t' in the global namespace
using ::div_t;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:102:9: error:
no member named 'ldiv_t' in the global namespace
using ::ldiv_t;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:104:9: error:
no member named 'lldiv_t' in the global namespace
using ::lldiv_t;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:106:9: error:
no member named 'atof' in the global namespace
using ::atof;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:107:9: error:
no member named 'atoi' in the global namespace
using ::atoi;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:108:9: error:
no member named 'atol' in the global namespace
using ::atol;
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/`c++/v1/cstdlib:110:9: error:
no member named 'atoll' in the global namespace
using ::atoll;
总计50个错误! 我想问的是,如果有办法恢复clang环境而不重新安装系统?我只是不确切知道这些功能在哪里......
答案 0 :(得分:0)
尝试从“应用程序”文件夹中删除Xcode.app,清空垃圾箱,然后从App Store重新安装。