Hi all,
Assume the following scenario. C source file is compiled with gcc using the following command.
Code:
gcc test.c -o test -I/path/to/headers -L/path/to/libs
Question 1: Would gcc search for the headers and libraries in those particular dirs exclusively, or would it include the default search path for both headers and libs?
In other words, does "-L/path/to/libs" set the library path or does it append to the default path?
Question 2: If the above appends, then how can I
set the search path?
Think of a more complex situation involving cross compilation or a system-wide upgrade where a collection of newly built libraries are bundled to a certain location, with the intention of having gcc link binaries against those new libraries as opposed to the old system libraries
Kind Regards