discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Cocoa/GNUStep compatible build


From: pepijn de vos
Subject: Re: Cocoa/GNUStep compatible build
Date: Mon, 3 Sep 2012 13:27:52 -0700 (PDT)

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 <ivucica@gmail.com>
To: Steve Van Voorst <svanvoorst@hughes.net>
Cc: pepijndevos@yahoo.com; Discuss-gnustep@gnu.org
Sent: Monday, September 3, 2012 12:07 AM
Subject: Re: Cocoa/GNUStep compatible build


On 2. 9. 2012., at 15:58, Steve Van Voorst <svanvoorst@hughes.net> 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
ivan@vucica.net - http://ivan.vucica.net/




reply via email to

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