This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /usr/lib vs. /usr/local/lib


   Is "/usr/local/lib" still searched before "/usr/lib" by GCC by
   default?  If not, is there a way to force GCC to search
   /usr/local/lib first?

GCC does search /usr/local/lib before /usr/lib (you can use gcc
-print-search-dirs to see the exact details for your configuration)
when linking, but your dynamic loader might not (which is what ldd
calls, and what is used when you run the program).  I think just
modifying /etc/ld.so.conf and putting /lib before /usr/local/lib (or
adding them in that order) should do the trick for you.  Don't forget
to run ldconfig after modifying ld.so.conf.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]