这是我的makefile
Compiler=/usr/bin/clang++
CC=/usr/bin/clang
Sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
DEVICE_SUPPORT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\)/Symbols
UIKIT_HEADER=$(Sysroot)/System/Library/Frameworks/UIKit.framework/Headers
FOUNDATION_HEADER=$(Sysroot)/System/Library/Frameworks/Foundation.framework/Headers
FRAMEWORKS=/opt/iOSOpenDev/frameworks
INCLUDE=/opt/iOSOpenDev/include
LIB=/opt/iOSOpenDev/lib
MAIN=./main
LDFLAGS= -lobjc \
-framework Foundation \
-framework UIKit \
-framework CoreFoundation \
-framework CoreLocation \
-multiply_defined suppress \
-L$(INCLUDE) \
-L$(LIB) \
-L$(Sysroot)/usr/lib \
-F$(Sysroot)/System/Library/Frameworks \
-F$(Sysroot)/System/Library/PrivateFrameworks \
-dynamiclib \
-init _mainInitialize \
-Wall \
-Werror \
-lsubstrate \
-licucore \
-llockdown \
-fobjc-exceptions \
-fobjc-call-cxx-cdtors
CFLAGS= -arch armv7 -miphoneos-version-min=4.0 -isysroot $(Sysroot) -I$(UIKIT_HEADER) -I$(FOUNDATION_HEADER) -I$(FRAMEWORKS) -I$(INCLUDE) -I$(LIB) -I$(MAIN)
HookObjects= $(MAIN)/main.o
如果我的main.h包含私有框架,它将给出错误,如:{。/ main / main.h:5:9:致命错误:'Preferences / Preferences.h'文件未找到}当我构建< / p>
答案 0 :(得分:0)
只是检查可能是您导入.m文件而不是.h文件,还检查项目中添加的框架,以便从CoreLocation
路径添加CoreFoundation
,Build Phases->Link Binaries with Libraries->Add this frameworks
框架。
我希望这可以帮到你..