object files, compiling, location
When you compile a program with standard header files like <iostream> it looks to me like the compiler never compiles any .cpp files for them so I assume the .o files are all stored somewhere so all the compiler does is link them. Is that right?
I did this: Code:
root@inferno:/home/icecube# find / -name iostream How does g++ know where to look for standard header files? Does it use the same PATH ($PATH?) variable (I can't remember what it's called) that the shell uses when tries to find executable files like ls? |
1) $PATH is for executable's :/bin:/usr/bin:/usr/local/bin etc.
2) LD_LIBRARY_PATH is for libraries (:/lib:/usr/lib: .. etc.) 3) c++ (g++), gcc has a 'build in' path, knowing where to look : when gcc, g++ is compiled with '--prefix=/usr', the path for the includes is ( for g++) /usr/include/c++/4.x.x/ .... for the '4.x.x' versions. ..... |
All times are GMT -5. The time now is 01:48 AM. |