[cfe-dev] Libtool search path on MacOS

Jacob Carlborg via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 26 14:21:58 PDT 2017


On 2017-06-26 22:58, scott constable via cfe-dev wrote:
> I just found the rest of the thread here:
> https://lists.apple.com/archives/xcode-users/2017/Jan/msg00089.html. The
> upshot is that C++ headers are no longer installed to /usr/include on
> MacOS. When you install the Xcode command-line tools, the C++ headers
> are stored in /Library/Developer/CommandLineTools/usr/include/c++/v1. So
> libtools built on MacOS should look here instead of /usr/include/c++/v1.
> How can this be done?

I'm not that familiar with libtools, I've only used the C API in 
libclang. In libclang you call the clang_parseTranslationUnit function 
and pass in the command line arguments that were passed to your 
application. It's possible to add an additional include search path 
before calling clang_parseTranslationUnit by adding ["-I", 
"/Library/Developer/CommandLineTools/usr/include/c++/v1"] to the command 
line arguments array. I'm not sure it's possible to do the same using 
libtools.

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list