discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Beginner questions regarding GNUStep on MS Windows and NSLog


From: Fred Kiefer
Subject: Re: Beginner questions regarding GNUStep on MS Windows and NSLog
Date: Tue, 02 Mar 2010 20:05:14 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0

Am 02.03.2010 17:19, schrieb address@hidden:
> Hi,
> 
> I bought the book Programming in Objective-C 2.0, then set up GNUStep on 
> Windows so that I could compile the examples and write other code.
> 
> The first example is a Hello World type of program that uses NSLog to output 
> to the terminal.  The book explains that one should compile this program in 
> the following manner:
> 
> gcc -framework Foundation prog1.m -o prog1

The framework flag is only implemented by Apples gcc and by an Cocotron
extension, if I remember correctly.

> The GNUStep Windows installation doesn't like this, complaining as follows:
> 
>   $ gcc -framework Foundation prog1.m -o prog1
>   gcc.exe: Foundation: No such file or directory
>   cc1obj.exe: error: unrecognized command line option "-framework"
> 
> So, I copied a GNUmakefile from one of the example applications, and changed 
> it to fit the example program as follows:
> 
>   include $(GNUSTEP_MAKEFILES)/common.make
>   APP_NAME = prog1
>   prog1_OBJC_FILES = prog1.m
>   include $(GNUSTEP_MAKEFILES)/application.make
> 
> Now the example program compiles fine when I run make, and it runs without 
> error when I run
> openapp ./prog1.app
> but my "Hello" string is not output to the terminal window I am working 
> within.  Does common.make or application.make redirect the NSLog output to 
> somewhere other than the terminal?  Is there another reason this might not 
> work as expected under M.S. Windows?

GNUsteps redirects the output of NSLog into the Windows event mechanism.
In all graphical applications writing anything to standard out wouldn't
make sense. You can get output at the prompt while debugging an
application. (Use debugapp instead of openapp)

Hope this helps
Fred




reply via email to

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