where is math.h in 10.7?

Discussion in 'Mac OS X Lion (10.7)' started by kriswalker, Mar 4, 2012.

  1. kriswalker macrumors newbie

    Mar 4, 2012

    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
  2. kriswalker thread starter macrumors newbie

    Mar 4, 2012
    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.


Share This Page