Including -R /usr/local/lib?

Amos A Gouaux amos@utdallas.edu
Sat Apr 18 08:31:00 GMT 1998


When using egcs on Solaris 2.6 to compile C++ code, for the
executable to run one must do the following:

   $ g++ t.C -R /usr/local/lib

If this is not done, then this is what happens:

   $ g++ t.C
   $ ldd a.out
           libstdc++.so.2.8.0 =>    (file not found)
           libm.so.1 =>     /usr/lib/libm.so.1
           libc.so.1 =>     /usr/lib/libc.so.1
           libdl.so.1 =>    /usr/lib/libdl.so.1

It seems like the g++ command should know where libstdc++ is, and
automatically add the `-R /usr/local/lib' business for the user.
Is there an option or environment setting for configure that I
can use to get egcs to automatically add the `-R /usr/local/lib'?

amos





More information about the Gcc mailing list