【发布时间】:2018-04-09 16:57:03
【问题描述】:
我使用 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环境?我只是不知道这些函数到底在哪里......
【问题讨论】:
标签: c++ macos clang environment clang++