Tanks for the help.

I created a brew formula for gnustep-make, and can compile a basic NSLog a... 
tool. https://github.com/mxcl/homebrew/pull/14645

However, I tried to do something "simple" like make a list of number and print 
those, or see if an NSArray has a hash.

It seems that you need to do something like [NSArray arrayWithObjects: 
[NSNumber numberWithInteger:1], [NSNumber numberWithInteger:1], [NSNumber 
numberWithInteger:1], nil] or use classic C arrays.

I read that in recent versions of Objective C it is possible to create literals 
of NSArray, NSNumber and NSDictionary.

This does not work for me, except for NSStrings. Am I using the wrong compiler? 
I seem to be using gcc, can I tell it to use llvm?

Are these literals supported on Linux as well?

Pepijn


________________________________
 From: Ivan Vučica <[email protected]>
To: Steve Van Voorst <[email protected]> 
Cc: [email protected]; [email protected] 
Sent: Monday, September 3, 2012 12:07 AM
Subject: Re: Cocoa/GNUStep compatible build
 



On 2. 9. 2012., at 15:58, Steve Van Voorst <[email protected]> wrote:

<<I want to write a command line app in Objective C that needs to run on  Linux 
and Mac. I read I can use Foundation on Linux using GNUStep.  Do I need the 
whole of GNUStep, or can I just depend on Foundation?>>
>
>In my experience, you need both <Foundation/Foundation.h> and 
><AppKit/AppKit.h>.  

Just to clear this up: if you are writing a command line tool, you definitely 
only need to include Foundation headers and link with Foundation. In fact, you 
don't even need to do that if you won't be using any classes from 
Foundation/gnustep-base. For example, you might write your own root class and 
use standard C input/output functions.

Regarding "app", we commonly call the command line stuff tools, not apps, in 
GNUstep; if it's a GUI program, then it's an app.

AppKit includes graphical components, such as windows, textfields, tabviews, et 
cetera. Unless you're writing a graphical app, you almost certainly don't need 
to include AppKit nor link with it. 
--
Ivan Vučica
[email protected] - http://ivan.vucica.net/ 
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to