hello, I'm reading the "Programming in Obj-C 2.0" book and I didn't understand how to compile the file using terminal.
any help?
thanks
any help?
thanks
cd ~/desktop
gcc file.m -o file -framework Foundation
./file
-bash: gcc: command not found
gcc Untitled.m -o Untitled -framework Foundation
When you install Xcode, it installs gcc. You said you installed Xcode, right? What is in your /Developer directory? (i.e.: what does 'ls /Developer' say?)how can I install GCC?
strange, both give me no such directory
maybe because I'm using snow leopard? how can I install GCC?
Do you still have a partition with something other than Snow Leopard (e.g., Leopard)? Was XCode installed under a different version of Mac OS X (i.e., not Snow Leopard)?
ya, i had leopard (which i think there is where I installed xCode) then i updated to snow leopard and before two days I added dual booting with leopard
/Volumes/Loeprad\ HD/Developer/usr/bin/gcc -v
-bash: /Volumes/Loeprad HD/Developer/usr/bin/gcc: No such file or directory
i get this :
Code:-bash: /Volumes/Loeprad HD/Developer/usr/bin/gcc: No such file or directory
btw what if i delete the old xCode and download iPhone SDK (it include xCode 3.2) (mine is 3.1)
gcc-4.2 MyFile.m -framework Foundation
gcc-4.2 -v
It would help if this:
Code:/Volumes/Loeprad\ HD/Developer/usr/bin/gcc -v
had the correct spelling of Leopard.