Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I find the header files for C on OS X Mountain Lion?

Tags:

c

macos

Where do I find the header files for C on OSX Mountain Lion?

A few articles on the web say they are in /usr/include but when I cd to /usr there is no include folder!

like image 691
Alex Avatar asked Oct 02 '22 17:10

Alex


2 Answers

From Paul R's comment:
"You need to install Xcode and the CLT (Command Line Tools) first - they are not installed by default."


So first download Xcode from App Store. Once you have Xcode.app, install the command line tools it includes.

Only then are the headers available in their default locations. (/usr/include)

like image 155
Daij-Djan Avatar answered Oct 05 '22 07:10

Daij-Djan


I have just found a working solution to install the include/ directory which contain the headers that you are looking for (Mojave 10.14.6 - Xcode 10.3), just run :

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
like image 28
HenriBrg Avatar answered Oct 05 '22 09:10

HenriBrg