I know how to compile an object program c using the gnustep version of mingw.
But I don't like their shell, and I want to use the standard mingw gcc compiler.
I put this gcc bin directory in the environment path, of course, open a command prompt in the helloworld.m directory
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog (@"Hello World!");
[pool drain];
return 0;
}
and enter
gcc -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString
but it does not work, because it cannot find the foundation / foundation .h
How to fix this and, if possible, avoid hardcoding in the welcome source code?
source
share