Chriss-MacBook-Pro-2:build louisduplessis$ cmake .. && make
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/utility:203:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:158:8: error: no
member named 'uint8_t' in the global namespace
using::uint8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:159:8: error: no
member named 'uint16_t' in the global namespace
using::uint16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:160:8: error: no
member named 'uint32_t' in the global namespace
using::uint32_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:161:8: error: no
member named 'uint64_t' in the global namespace
using::uint64_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:178:8: error: no
member named 'uint_fast8_t' in the global namespace
using::uint_fast8_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:179:8: error: no
member named 'uint_fast16_t' in the global namespace
using::uint_fast16_t;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstdint:180:8: error: no
member named 'uint_fast32_t' in the global namespace
using::uint_fast32_t;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/path_planning.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/path_planning.dir/all] Error 2
make: *** [all] Error 2
如何修复这些致命错误?
我使用brew安装了cmake,当我升级到新的Mac时,这些错误开始出现。
这和cmake本身的偏好有关系吗?
我在中看到同样的错误npm 安装鹰嘴豆泥或者当我尝试时clang++测试.cpp for
#include <cstdint>
int main(int argc, char **argv) {
return 0;
}
要编译,请将 Mac SDK 添加到包含路径:
clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk test.cpp
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)