Co może powodować takie błędy? Dodałem pusty projekt do Xcode, dodałem/usr/local/lib w Header Search Paths i dodałem kilka bibliotek opencv. Budynek dał te błędy:Błędy w cstdint: Brak elementu o nazwie xxx w globalnej przestrzeni nazw
UPDATE
Wydaje stdint.h rzeczywiście jest zainstalowany w moim systemie. Używam systemu OS 10.9, więc typy takie jak int_least16_t
, które xcode nie może znaleźć w globalnej przestrzeni nazw, wydają się być zdefiniowane.
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
Czy masz również włączoną obsługę C++ 11? – lpapp
Tak, używam biblioteki standardowej C++, której używam to libC++ (standardowa biblioteka LLVM C++ z obsługą C++ 11). Używam również języka C++ Language Dialect GNU ++ 11. Te same błędy występują podczas używania dialektu, C++ 11. Upewniłem się, że kompilator, którego używam (Apple LLVM 5.1) rzeczywiście używa tych opcji. –
Czy zweryfikowałeś, że naprawdę masz 'stdint.h' zainstalowany w twoim systemie i że te typy są zadeklarowane w nim? – Amadeus