I am exploring with compiling an application with GNUstep on Windows. This is my main.m file:
#import <???/???.h>
int main(int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
[pool release];
}
I realize this is an incomplete fragment to say the least and it obviously won't do anything. I have tried several different import statements including Cocoa/Cocoa.h, GNUstepGUI/GMAppKit.h, etc. But I always run into errors with compiling that I can't seem to find help with online.
This is my compile command, which I am running from the mingw shell:
gcc -o test main.m -I /GNUstep/System/Library/Headers/ \ -L /GNUstep/System/Library/Libraries/ -lobjc -lgnustep-base \ -fconstant-string-class=NSConstantString -enable-auto-import
These are the errors I get:
c:/WINDOWS/TEMP/ccHxKZG2.o:main.m(.data+0x390): undefined reference to '___objc_class_name_NSApplication' collect2:ld returned 1 exit status
Any ideas on what I need to #import, or what needs fixing in my compile command?
Thanks!