discuss-gnustep
[Top][All Lists]
Advanced

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

Re: new users question (continued...)


From: Lars Sonchocky-Helldorf
Subject: Re: new users question (continued...)
Date: Wed, 20 Apr 2005 11:15:51 +0200

address@hidden wrote 
on 20.04.2005 09:39:57:

> Citát Lloyd Dupont <address@hidden>:
> 
> > I finally get some very simple ObjectiveC prgram working
> > So I though Let's try to use foundation!
> > 
> > I setup the very simple following environment variables
> > set
> >
> PATH=D:\GNUstep\Development\msys\1.0\bin;D:
> \GNUstep\Development\msys\1.0\mingw\bin;%PATH%
> > set OBJC_INCLUDE_PATH=D:\GNUstep\System\Library\Headers
> > 
> > then I tryed to compile this very simple program:
> > #import <Foundation/Foundation.h>
> > 
> > // gcc deux.m -Wno-import -lobjc -o deux.exe

to clear up the cause a little bit:

You make use of the @"somestring" construct in your code. That syntax is 
just a shortcut for the creation of a constant string instance - most 
likely (at least if you using some OpenStep descendant) of type 
NSConstantString. The compiler doesn't know per se what class to 
instantiate for that purpose since (unlike in Java) the language ObjC and 
the library/framework OpenStep (in this case GNUstep) are a different pair 
of shoes. Although they work closely together it is possible to have 
another framework with another class hierarchy instead of OpenStep (Swarm 
comes to my mind here). To tell the compiler which class to use for 
creating constant strings you have to use a compiler flag: 
-fconstant-string-class. For example:

-fconstant-string-class=NSConstantString

see also: http://www.dis.com/gnu/gcc/Objective-C-Dialect-Options.html

nevertheless you should use GNUstep-make since it's so much simpler than 
compiling by hand.

> 
> use GNUmakefile instead with contents:
> 
> --- BEGIN GNUmakefile ---
> 
> include $(GNUSTEP_MAKEFILES)/common.make
> 
> TOOL_NAME  = deux
> deux_OBJC_FILES = deux.m
> 
> include $(GNUSTEP_MAKEFILES)/tool.make
> 
> --- END GNUmakefile ---
> 
> then just type make. 
> 
> <snip>
> 
> > Anyway, if someone read that, let me ask again on how to ship a 
GNUstep base
> > program without installing GNUstep, but just the required DLLs.... any
> > though? links? ideas? 
> > thanks!
> 
> AFAIK, you still have to have GNUstep stuff instaled, because GNUstep is 
not
> just "a bunch of libraries", it is more complex runtime environment 
> composed of
> libraries, "servers" and resources. It can be roughly compared to the 
Java
> runtime environment.
> 
> Regards,
> 
> Stefan Urbanek
> --







reply via email to

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