Jonathan
Jonathan

Reputation: 3034

How to solve Apple Mach-o linker error? (_OBJC_CLASS_$_Connection", referenced from..)

I get this error and people says it about missing frameworks but i can't see I'm missing any.

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Connection", referenced from:
objc-class-ref in SocketServer.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

It happens when i add this:

theServer = [[SocketServer alloc]init];
theServer.serverName = [NSString stringWithFormat:@"%@", username];
theServer.delegate = self;

What is there to try?

SocketServer is a class from a project from the book Apress Beginning iPhone Games Development

Upvotes: 1

Views: 965

Answers (1)

trojanfoe
trojanfoe

Reputation: 122391

I can see from the book's source code, that there is a related Connection class that you are forgetting to link with:

Beginning iPhone Games Development Source Code/chapter 15 - PartyTime - Peter Bakhirev/TwentyFour final/Classes/Connection.m

Add that class to your project and it should then link.

Upvotes: 2

Related Questions