Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

NeoDarkboy

macrumors newbie
Original poster
Mar 10, 2011
6
0
Hi, is me again :p, i have this error while linkin:

Code:
Undefined symbols:
  ".objc_class_name_AppDelegate", referenced from:
      .objc_class_name_MyAppDelegate in MyAppDelegate.o
  ".objc_class_name_GLView", referenced from:
      .objc_class_name_MyAppView in MyAppView.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

AppDelegate and GLView are inside a library, and MyAppDelegate and MyAppView are in a main project.

The target of the main project includes the library.a.

AppDelegate and GLView are added to the target compile sources, same for MyAppDelegate and MyAppView


Here is the code:

MyAppDelegate.h:

Code:
#import <Cocoa/Cocoa.h>
#import <lib/AppDelegate.h>
@interface MyAppDelegate : AppDelegate {

}

MyAppDelegate.mm

Code:
#import "MyAppDelegate.h"

@implementation GameDelegate

@end

AppDelegate.h:

Code:
#import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h>
#import <GLView.h>

@interface AppDelegate : NSObject <NSApplicationDelegate, NSWindowDelegate> {

}
@end

GLView.h:

Code:
#import <Cocoa/Cocoa.h>
#import <QuartzCore/CVDisplayLink.h>

@interface EAGLView : NSView {

}
@end
 
Last edited by a moderator:
Ok, i resolved the problem, after checkin there weren't duplicated librarys, in targets/link binary with librarys and Library Search Paths, and check that the files are added to the compile sources, i detected that the problem was that in the project get info, in Build, was unchecked the Build Active Architecture Only, so i checked, and my problem was fixed. The linkin error was from another arch that i wast using.

Me and Xcode are not good friends :(

Well hope this help somebody else :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.