Hi, is me again
, i have this error while linkin:
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:
MyAppDelegate.mm
AppDelegate.h:
GLView.h:
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: