![]() |
|
gcc: INCLUDE_PATH and LIBRARY_PATH |
Marco Radaelli
Member #3,028
December 2002
![]() |
I set them properly, but it seems that gcc isn't using them. Is there a switch I should use? I'm saying this because I compiled a gtk example (on Windows) and if I set the list of directories in the two environment variables, gcc complains about missing header files, but if I pass the directories with, respectively, -I and -L everything works perfectly
|
BAF
Member #2,981
December 2002
![]() |
-I\blah\ for include and -Lblah for library path. [edit] Didnt read your part where you said -I and -L you used. |
Marco Radaelli
Member #3,028
December 2002
![]() |
I said: but if I pass the directories with, respectively, -I and -L everything works perfectly
|
BAF
Member #2,981
December 2002
![]() |
See my edit |
Kitty Cat
Member #2,815
October 2002
![]() |
Isn't the library env var LD_SEARCH_PATH? I don't recall exactly what it its, but I remember the LD_ and I don't think LIBRARY was a part of it. -- |
Arthur Kalliokoski
Second in Command
February 2005
![]() |
There's also some config file (ascii) somewhere that tells gcc where the default stuff is, I remember fiddling with it so I could have my own libraries & headers separate from the default locations. IIRC, putting the -v switch in while compiling something will show this process and which file tells it to look where for include & lib. They all watch too much MSNBC... they get ideas. |
Marco Radaelli
Member #3,028
December 2002
![]() |
I finally found it in the docs gcc manual said:
LIBRARY_PATH And I remember this one... gcc manual said:
CPATH CPATH specifies a list of directories to be searched as if specified with -I, but after any paths given with -I options on the command line. The environment variable is used regardless of which language is being preprocessed. The remaining environment variables apply only when preprocessing the particular language indicated. Each specifies a list of directories to be searched as if specified with -isystem, but after any paths given with -isystem options on the command line.
I didn't recall these, maybe they're new?
|
Evert
Member #794
November 2000
![]() |
There's LD_LIBRARY_PATH and several other LD_ environment variables (LD_SEARCH_PATH may be there as well, don't know). These are for the loader (linker for Windows people) and specify directories where shared objects are looked for. |
Marco Radaelli
Member #3,028
December 2002
![]() |
Quote: There's LD_LIBRARY_PATH and several other LD_ environment variables (LD_SEARCH_PATH may be there as well, don't know). These are for the loader (linker for Windows people) and specify directories where shared objects are looked for.
To which version are you referring to? I can't find them in the docs I have (could be... the ones I have are for gcc 3.2.3 [edit] Just updated to the docs for gcc 3.4.4, but I can't find any page on LD_* environment variables
|
Evert
Member #794
November 2000
![]() |
LD_LIBRARY_PATH is documented in the documentation for ld, not gcc. Not too well documented though; I'm sure there must be a better place where it's documented, but I'm not sure where. |
marcin
Member #5,814
May 2005
|
|