0

这是我的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: fatal error: 'Preferences/Preferences.h' file not found }

4

1 回答 1

0

只需检查可能是您导入 .m 文件而不是 .h 文件,还检查项目中添加的框架或不添加CoreLocation,路径中的CoreFoundation框架..Build Phases->Link Binaries with Libraries->Add this frameworks

我希望这对你有帮助..

于 2012-11-23T04:44:59.223 回答