is /usr/include a link ?

is /usr/include a link ?

Posted on Dec 11, 2025 8:43 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 11, 2025 6:11 PM

smaragd77 wrote:

is /usr/include a link ?


No. That directory is also not used.


Clang (used with Xcode) and gcc supports SDKROOT, unsure about icc.


Here’s a sometimes-recommended shortcut for teaching (other) compilers about each other:

export SDKROOT="`xcrun --show-sdk-path`"


Or here’s some code showing the location of the Xcode-embedded include directory::

% xcrun --show-sdk-path                                                                                          

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

% ls "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"


For help with Xcode, there’s an Apple Developer forum for it, as well as for some other developer-focused forums:

Xcode | Apple Developer Forums


While looking for Intel info, it seems Intel requires a signup-in to view postings in their forums, but they allow those same forums to be crawled by the search engines. That means you can search for pointers to answers in the Intel icc forums, but not read them. Not without creating an Intel account. Go figure. 🙄


Intel icc also appears deprecated as of 2024. “Intel® C++ Compiler Classic (icc) is deprecated and was discontinued in the oneAPI 2024.0 release. Intel recommends that customers transition now to using the LLVM-based Intel® oneAPI DPC++/C++ Compiler (icx) for continued Windows* and Linux* support, new language support, new language features, and optimizations.”


8 replies
Question marked as Top-ranking reply

Dec 11, 2025 6:11 PM in response to smaragd77

smaragd77 wrote:

is /usr/include a link ?


No. That directory is also not used.


Clang (used with Xcode) and gcc supports SDKROOT, unsure about icc.


Here’s a sometimes-recommended shortcut for teaching (other) compilers about each other:

export SDKROOT="`xcrun --show-sdk-path`"


Or here’s some code showing the location of the Xcode-embedded include directory::

% xcrun --show-sdk-path                                                                                          

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

% ls "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"


For help with Xcode, there’s an Apple Developer forum for it, as well as for some other developer-focused forums:

Xcode | Apple Developer Forums


While looking for Intel info, it seems Intel requires a signup-in to view postings in their forums, but they allow those same forums to be crawled by the search engines. That means you can search for pointers to answers in the Intel icc forums, but not read them. Not without creating an Intel account. Go figure. 🙄


Intel icc also appears deprecated as of 2024. “Intel® C++ Compiler Classic (icc) is deprecated and was discontinued in the oneAPI 2024.0 release. Intel recommends that customers transition now to using the LLVM-based Intel® oneAPI DPC++/C++ Compiler (icx) for continued Windows* and Linux* support, new language support, new language features, and optimizations.”


Dec 11, 2025 9:53 AM in response to IdrisSeabright

in OS Monterey

I'm making the #include <> tree in SDK available to another compiler, intel icc

I have found a solution in https://apple.stackexchange.com/questions/337940/why-is-usr-include-missing-i-have-xcode-and-command-line-tools-installed-moja:

which is identify the SDK include tree and supply it to each icc compile with option -isysroot


% xcrun --show-sdk-path

/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk


% icc -isysroot icc -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk -o binary source.c

Dec 12, 2025 7:08 AM in response to smaragd77

smaragd77 wrote:

the reason I asked is: icc requires requires /usr/include or a work-around

and ../include is not in /usr in recent Xcode present but in SDK

the fix is an option icc -"-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk"

where 13.1 is an example

many thanks


That’s what the xcrun command gets, and what Xcode and clang and gcc tools can use.


The simple approach will break whenever Xcode shifts, which is fairly often.


Suggest Intel add support for SDKROOT, if their llvm-based compiler does not already provide that.

is /usr/include a link ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.