grepNstepN grepNstepN - 1 year ago 73
C++ Question

OSX 10.11.6 Make cant find headers specified --include-dir not working

I'm attempting to compile code on OSX 10.11.6
The header file to use is in:


So as a test, the c code incudes i386/_types.h thats located in [.../usr/include/i386/_types.h] so I used:

make --include-dir=/Applications/

However, it still doesn't find the _types.h file under the i386 directory and throws an error stating file not found!

Answer Source

It turns out I should have used clang instead of g++, from there the library path argument had to be specified along with the framework e.g.

clang -stdc++ -framework

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download