I was reading these questions https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux


I'm compiling gmp

./configure --prefix=/usr/local/Custom/gmp

and installing producing three folders.

include, lib and share

In the case, bin

export PATH=$PATH:/usr/local/Custom/SOMEPROGRAM/bin

The lib folder can be added using

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Custom/gmp/lib

My question, Is there some PATH_VARIABLE for include different folders (with *.h files)?

export PATH_VARIABLE=$PATH_VARIABLE:/usr/local/Custom/gmp/include

1 Answer 1


Set C_INCLUDE_PATH for C header files or CPLUS_INCLUDE_PATH for C++ header files or CPATH for both

There's more info here, or read man gcc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.