Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.objective-c > #197
| From | "Pascal J. Bourguignon" <pjb@informatimago.com> |
|---|---|
| Newsgroups | comp.lang.objective-c |
| Subject | Re: New to Objective-c: issue with libraries |
| Date | 2015-11-11 19:26 +0100 |
| Organization | Informatimago |
| Message-ID | <878u644ckw.fsf@kuiper.lan.informatimago.com> (permalink) |
| References | <23e4b497-b862-4c4a-9326-8aaabea64ec2@googlegroups.com> |
modelling.data@gmail.com writes:
> Hello!
>
> I am new to programming, and to Objective-C. I currently take a free online
> course on CS, which includes C programming, and has also introduced Objective-C.
>
> Please, take a look at the program below, which uses Stanford Portable Library.
>
> I work on Mac OS 10.7.5, Xcode 4.6.3, Terminal 2.2.3, and would like to make
> and compile such programs within these programs. What shall I do, which headers
> shall I use? Shall I download them?
Yes.
You could write a makefile to compile your spl-example.m file:
-----(Makefile)-----------------------------------------------------------------
all:spl-example
.PHONY::run get-dependencies
get-dependencies:
cd /usr/local/src/ ; git clone git@github.com:cs50/spl.git
cd /usr/local/src/spl ; make && make install
run:spl-example
CLASSPATH=/usr/local/lib/spl.jar ./spl-example
spl-example:spl-example.m
gcc -o spl-example spl-example.m -lcs -lm
clean:
rm spl-example
----------------------------------------------------------------------------------
To install spl:
make get-dependencies
and then to run your program:
make run
WFM on MacOSX and on Linux.
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk
Back to comp.lang.objective-c | Previous | Next — Previous in thread | Find similar | Unroll thread
New to Objective-c: issue with libraries modelling.data@gmail.com - 2015-11-10 23:25 -0800 Re: New to Objective-c: issue with libraries "Pascal J. Bourguignon" <pjb@informatimago.com> - 2015-11-11 19:26 +0100
csiph-web