Modify GCC libraries path

Ian Lance Taylor iant@google.com
Wed Nov 23 22:01:00 GMT 2011


stl <st.lambert02@gmail.com> writes:

> I would like to know if I can modify the path where GCC expects to
> find libraries,
> notably libraries from standard libc?
> If so, where should I change this path?

You can use a -L option on the command line.  You can use a shell script
to pass those -L options by default.  You can set the environment
variable LIBRARY_PATH.

If you really want to modify gcc itself, see gcc/cppdefault.c.

Ian



More information about the Gcc-help mailing list