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