Getting fatal error: 'type_traits' file not found #include <type_traits>, while building clang example

a 夏天 提交于 2019-12-04 17:06:34

OS X (macOS) has a bit different approach. You can have several Xcode installed and you compile for different platforms. You should use -isysroot option to explicitly specify against which SDK to build.

The following command should do the trick

clang++ -std=c++0x PrintFunctionNames.cpp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk

Otherwise, please check which SDKs are installed and change the value of isysroot to correspond to your setup.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!