9

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

https://unix.stackexchange.com/a/45106/235247

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 Answers1

8

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

void
  • 5
PiedPiper
  • 944