cstdint中的错误:全局命名空间中没有名为xxx的成员

Ros*_*one 8 c++ macos

什么会导致这样的错误?我向Xcode添加了一个空项目,在Header Search Paths中添加了/ usr/local/lib,并添加了一些opencv库.Building出现了这些错误:

UPDATE

看来stdint.h确实安装在我的系统上.我在OS 10.9上运行,所以像int_least16_txcode 这样的类型在全局命名空间中找不到似乎是定义的.

typedef int16_t int_least16_t;.

find /Applications/Xcode.app -name stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/c++/4.2.1/tr1/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/c++/4.2.1/tr1/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/tr1/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/tr1/stdint.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/stdint.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/5.1/include/stdint.h
Run Code Online (Sandbox Code Playgroud)

Ros*_*one 9

感谢@nm,我了解到直接安装任何东西/usr/local都会因为随之而来的版本地狱而被打破.我很可能不得不在坏的一些源/usr/local/include,所以当我更换usr/local/include/usr/local/Cellar/opencv/2.4.8.2/include/opencv2的(因为我安装使用BREW的OpenCV) Xcode > Build Settings > Header Search Paths(递归真)一切正常.