discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Inquiry re. compilation.


From: Pascal Bourguignon
Subject: Re: Inquiry re. compilation.
Date: Sat, 21 Sep 2002 07:21:39 +0200 (CEST)

> From: =?iso-8859-1?q?Marko=20Riedel?= <address@hidden>
> Date: Fri, 20 Sep 2002 15:09:54 +0200 (CEST)
> 
> 
> Hi folks,
> 
> I'm sort of toying with the idea of writing an Objective C tutorial by
> discussing common programming tasks related to combinatorics. This is just
> an idea, though, and I can't promise anything. I would be using what Apple
> calls the "Foundation classes" (e.g. NSDictionary, NSValue etc.) as
> opposed to the "Appkit classes" (e.g. NSButtonCell, NSView etc.) 
> 
> I have a very basic question. If I have a C program or a Perl script, I
> can compile and run it with a single command. What is the shortest command
> to compile an Objective C program that is contained in a single file, does
> not need a GUI, but makes use of the "Foundation classes.", all of it
> without setting up a Project / using the .app framework.
> 
> Thanks.
> 
> Best regards,
> 
> Marko

A simple gcc should be enought.

Something like:

export 
GS_LIB=$GNUSTEP_SYSTEM_ROOT/Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO

gcc -objc -g -Wall -o my-objc-pgm  my-objc-pgm.m \
    -L$GS_LIB -L/usr/lib -lgnustep-base  -lobjc  -lpthread 



But  since it's  easier to  type make  rather than  gcc and  all these
options, I usually put it into a small Makefile anyway.


-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
 The name is Baud,...... James Baud.




reply via email to

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