Try setting C_INCLUDE_PATH
(for C header files) or CPLUS_INCLUDE_PATH
(for C++ header files).
As Ciro mentioned, CPATH
will set the path for both C and C++ (and any other language).
More details in GCC’s documentation.
More Related Contents:
- How to add a default include path for GCC in Linux?
- Where are include files stored – Ubuntu Linux, GCC
- How do I delete an exported environment variable?
- Multiple glibc libraries on a single host
- How to keep environment variables when using sudo
- How do the likely/unlikely macros in the Linux kernel work and what is their benefit?
- Is there a way to change the environment variables of another process in Unix?
- How can I link to a specific glibc version?
- Allowed characters in Linux environment variable names
- How to invoke a system call via syscall or sysenter in inline assembly?
- Static link of shared library function in gcc
- How to print the ld(linker) search path
- Calling printf in x86_64 using GNU assembler
- How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake
- “/usr/bin/ld: cannot find -lz”
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- How to specify the library version to use at link time?
- Can _start be the thumb function?
- How to change the default GCC compiler in Ubuntu?
- How can I select a static library to be linked while ARM cross compiling?
- What is the ‘soname’ option for building shared libraries for?
- Force gcc to compile 32 bit programs on 64 bit platform
- How do you link to a specific version of a shared library in GCC
- How to include all objects of an archive in a shared object?
- How can I set an environment variable only for the duration of the script?
- How can I permanently export a variable in Linux?
- get string length in inline GNU Assembler
- Make install, but not to default directories?
- undefined reference to symbol even when nm indicates that this symbol is present in the shared library
- /usr/bin/ld: skipping incompatible foo.so when searching for foo