Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make command line compiler work with Xcode 4.3

I have Xcode 4.3 and it works fine. However, running make to compile a program from the command line gives me many errors about missing standard headers, such as

error: stdio.h: No such file or directory

The problem may be that Xcode 4.3 (as opposed to older versions) is installed like a standard Mac app bundle (no installer inside a dmg..) so the paths don't get set up automatically.

How can I setup the command line tools to look into the /Applications/Xcode.app/ bundle and its subfolders for the standard headers and libraries?

$ which make
/Applications/Xcode.app/Contents/Developer/usr/bin/make
like image 318
Tomas Andrle Avatar asked Feb 23 '26 14:02

Tomas Andrle


1 Answers

With the full release of XCode 4.3 (and OS X 10.7.3) you can go to Preferences > Downloads > Command Line Tools and click 'Install'.

It appears that you need to have a developer account though.

like image 90
Steve Streeting Avatar answered Feb 26 '26 14:02

Steve Streeting