Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change gcc include path globally

So, I'm trying to compile Ardour, on my 64-bit Mac (OS X 10.8.5), but it can't find some header files. The header files are located in /opt/local/include, which doesn't show up in gcc's list of search paths, as returned by gcc -x c++ -v -E /dev/null.

I've read How do I add a directory to C header include path?, and tried setting C_INCLUDE_PATH=/opt/local/include, but nothing's changed - gcc still doesn't list it as an include path. (I also tried CPP_INCLUDE_PATH, just in case - no dice.) I can't (reasonably) add a command line option to specifically include that directory, since the project uses a config script. Any ideas?

like image 802
Erhannis Avatar asked Apr 08 '26 07:04

Erhannis


1 Answers

Typically for C++ it should be:

CPLUS_INCLUDE_PATH=/opt/local/include 
export CPLUS_INCLUDE_PATH

You can also set that in your .bash_profile for future use.

like image 166
l'L'l Avatar answered Apr 10 '26 22:04

l'L'l



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!