Reputation: 3
I'm working on simple app, and there is no errors while i'm writing the code, but when i push build button, the error has occur. Build myProject: Failed, and xCode show me two error warnings. Here the errors message:
Ld /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator/Calculator.app/Calculator normal i386
cd "/Users/MacUser/Downloads/Downloads/Desktop/old drop box/calc/Calculator"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
-L/Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator
-F/Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator
-filelist /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Intermediates/Calculator.build/Debug-iphonesimulator/Calculator.build/Objects-normal/i386/Calculator.LinkFileList
-mmacosx-version-min=10.6 -Xlinker
-objc_abi_version -Xlinker 2
-fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100
-framework UIKit -framework Foundation -framework CoreGraphics
-o /Users/MacUser/Library/Developer/Xcode/DerivedData/Calculator-azorstixlscpikfhurtxwvvwachh/Build/Products/Debug-iphonesimulator/Calculator.app/Calculator
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AxesDrawer", referenced from:
objc-class-ref in AxesView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am found something, here is my controller.m code:
#import "AxesView.h"
#import "AxesDrawer.h"
@implementation AxesView
- (void)drawRect:(CGRect)rect
{
CGRect b;
b = self.bounds;
CGPoint aO;
aO = b.origin;
CGFloat pPU;
pPU = b.size.height;
[AxesDrawer drawAxesInRect:(CGRect)b originAtPoint:(CGPoint)aO scale:(CGFloat)pPU];
}
@end
The problem i think in my AxesDrawer.h file, but i don't know why. If i change import from AxesDrawer.h to AxesDrawer.m (i know that's wrong but just for test) the project will build and work in simulator. Can somebody help me with this? What i made wrong?
Upvotes: 0
Views: 868
Reputation: 57168
AxesDrawer.m is probably not in your target. Click on it and use the far-right Utilities panel and make sure it's checked for the target you're building.
Upvotes: 3