Just to make sure that everything is working, here's some nice GNUstep code to display a panelalert.
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
int
main (void)
{
NSAutoreleasePool *pool;
pool = [NSAutoreleasePool new];
[NSApplication sharedApplication];
NSRunAlertPanel (@"Test", @"Hello from the GNUstep AppKit",
nil, nil, nil);
return 0;
}To build this one in the terminal, you better write a GNUmakefile. That's actually the name you have to give it. (you can read all about it here )the content for now should be
Simply type "make" and there's your .app. Run it with "openapp ./FirstApp.app".include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = FirstAppFirstApp_OBJC_FILES = source.m include $(GNUSTEP_MAKEFILES)/application.make
If "make" gives you a headache, make sure you have the GNUstep-dev package installed if you went the app-get path, and check your variables with "env | grep GNU". (ignore the old GNU_ROOT.. variables though)
Inga kommentarer:
Skicka en kommentar