Help with programming in C or Perl or Python

Joined
Oct 1, 2007
Messages
1
Reaction score
0
Points
1
I am used to programming on Red Hat Linux. I'm trying to figure out how to program on my mac, and I've found about a thousand ads on the apple website telling me that my computer came with Perl and Python and the GCC 4.0 compiler. Only I can't find files for these anywhere. Does anyone know what should go in the #! line for Perl? Or why gcc/cc only give me "command not found" on the command line ("which gcc" replies "no gcc in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/teTeX/bin/i386-apple-darwin-current" and I can't find the library files either)? I'm less familiar with Python, but if someone could get me going on that, I'd take it. I'm just trying to do some desktop programming and have no interest in working in some sort of GUI environment.

Also (other assorted questions), how do I update my path? And is there any editor I can use other than emacs? (xemacs, nedit don't seem to be around)

I'd really appreciate any help anyone could give me.
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
I think you might need to install the developer tools from your install DVD.
 
D

danielb

Guest
I think developer tools will get you the Perl, Python, and GCC. When GCC is installed it will be installed in a directory called gcc-4.0 not gcc. If you want to compile using gcc filename, You'll need to link gcc to gcc-4.0. I also suggest installing gcc-3.X. GCC is installed in /usr/bin

For editor, I use VIM which I can't remember installing. I think it comes with XCode.

C headers are in /usr/include and libraries are in /usr/lib

Perl and Python, you're on your own. I've only tinkered with them.
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
#!/usr/bin/perl
You can do a which perl, that will tell you the locate of the program. As Aptmunich suggested you will need to install the developer tools.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top