GNUStep Undefined reference-Collection of common programming errors
I am making a program in GNUStep on windows with the following code:
#import
#import
int main(int argc, char *argv[]) {
NSApplication *myApplication = [NSApplication sharedApplication];
}
However, when I compile (with gcc -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -std=c99
), I get this error:
undefined referenceto `__objc_class_name_NSApplication'
collect2: ld returned 1 exit status
I can #import
fine, but when I try to call NSApplication
I get this error. How can I fix this?
Originally posted 2013-11-09 20:51:01.