0

My project have no visible error but when i try to run it gives following error

Undefined symbols for architecture i386:
 "_OBJC_CLASS_$_ConcreteScreen", referenced from:
 objc-class-ref in ViewController.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 using my ContactScreen class in ViewController.m

i tried by @class ContactScree and #import "ContactScreen.h"

and in my ViewController i am using it as [ContactScreen myMethod]; when i comment out this line it work fine but now it is giving compile time error :( yesterday it was wroking fine

here is my code

#import "ViewController.h"
#import "ConcreteScreen.h"
@interface ViewController ()
@end
@implementation ViewController
-(IBAction)btnContactPress:(id)sender{
 NSLog(@"Contact Screen");
 ConcreteScreen *coontact = [[ConcreteScreen alloc]init];
}
asked Jun 14, 2012 at 18:18

2 Answers 2

2

You confused ConcreteScreen and ContactScreen and compiler told you that it isn't aware about ConcreteScreen

answered Jun 14, 2012 at 18:30
Sign up to request clarification or add additional context in comments.

1 Comment

Thanx alot you solved my problem :) i forgot that i was created ConcreteScreen class and without reading complete name i was importing it instead of ContactScreen but i am strange i was deleted ConcreteScreen why it is still showing ConcereteScreen in intellignce :(
1

Be sure your .m file is included in the project. It's possible to create it, use the header and all but it doesn't go into the build. Also it needs to be in the target.

answered Jun 14, 2012 at 18:26

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.