1
我在编译main.m时遇到了以下错误(Objective-C) 我正在使用makefile来构建此文件。CLang编译失败
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -Wall -DDEBUG=1 -g -o main.o main.m -mmacosx-version-min=10.8 -F/Volumes/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/
In file included from main.m:9:
In file
included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:138:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:7:
/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:64:10: fatal error:
'ImageIO/ImageIO.h' file not found
#include <ImageIO/ImageIO.h>
^
1 error generated.
make: *** [main.o] Error 1
我不知道为什么这个ImageIO/ImageIO.h
找不到。这背后的原因是什么? 此外,我想知道如何让Clang查看/Volumes/Xcode.app/Contents/Developer/ (选项-F中指定)中的框架?
感谢您的回答。后来我发现我需要在--sysroot标志下提到它。通过这个,我得到了编译的文件。 – doptimusprime 2013-02-27 07:25:51