Originally Posted by ethereal1m
I was actually thinking about "include files" (like stdio.h, iostream, etc), not shared objects file. Hmmm, can we call include files shared libraries? or we just call them "include files". Include files are usually under /usr/include. And my stdio.h files are multiple in that location.
How can I now which "include files" the gcc uses? Sorry for the mix up...
They're called header files, not shared libraries. What do you mean by, "my stdio.h files are multiple in that location"? Are you saying that you have multiple files with the same name in a given directory?
The specific directories that gcc looks in for header files are defined when it is built. From the man page:
Each variable's value is a list of directories separated by a
special character, much like PATH, in which to look for header
files. The special character, "PATH_SEPARATOR", is target-
dependent and determined at GCC build time. For Microsoft Windows-
based targets it is a semicolon, and for almost all other targets
it is a colon.
There's more text there that you may want to read. If you want to specify other directories in which to look, use the -I option.