help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Porting from MacOS X to GNUstep, some help needed


From: Fred Kiefer
Subject: Re: Porting from MacOS X to GNUstep, some help needed
Date: Tue, 13 Oct 2009 08:36:07 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Michael Thaler schrieb:
> Hi,
> 
> I try to port an application from MacOS X to GNUstep. The first thing I did 
> was 
> to create a GNUmakefile to compile the application. I got the whole thing 
> compiled relatively quickly and when I start the application, it actually 
> shows an application icon. However, no menus or windows are shown.
> 
> First, the application main function looks like:
> 
> #import <Cocoa/Cocoa.h>
> 
> int main(int argc, char *argv[])
> {
>     NSLog(@"main");
>     return NSApplicationMain(argc, (const char **) argv);
> }
> 
> I think NSApplicationMain loads the MainMenu.nib. Is this correct?
> 
> To see what's going on, I ran
> 
> $ strace openapp ./MyApp.app
> 
> But I could not see any output that indicates that the application tries to 
> load .nib files. I attached the end of the strace output.
> 
> Maybe someone can give me a hint what the application is supposed to do when 
> NSApplicationMain is executed and how you can debug this.

You will need to tell the application which NIB file should be loaded as
the main NIB. The simplest way to do this is to put it into the
GNUmakefile, have a look at Ink or any other of the graphical example
files to see how this can be done.

Your application may also need a plist file, depending on what sort of
application it is. One way to avoid this complexity is to use pbxbuild,
which allows you to use your Xcode project file to compile with GNUstep.

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]