Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kriswalker

macrumors newbie
Original poster
Mar 4, 2012
2
0
Folks,

I installed 10.7 on a clean disk from a recovery USB a few days ago. Then I installed Xcode from the App store and executed it after it was installed in /Applications to complete the installation. Then I opened a new terminal window and typed "gcc". It was not listed as being in my path. So I assumed that gcc was not installed with Xcode. So then I went to HPC OSX website to get gcc and gfortran binary compilers for Lion. I put them in /usr/local. Now they are in my path, and when I create a simple program that includes math.h functions, math.h is not found. Can you help me?

Thank you,
Kris Walker
 
Install "Command Line Tools"

Update: Found that I need to open Xcode, go to Preferences->Downloads, and install "Command Line Tools". Then a symbolic link to llvm-gcc-4.2 is installed at /usr/bin/gcc. I can use that one to compile my code without the problems I mentioned earlier.

Kris
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.