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
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)