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]

RE: About Linking of a simple C++ prog.


>  I have tried g++ & gcc -lstdc++, it doesn't work either, 
> although the error messages is different as follows:
> $PWD$g++ test.cpp
> $PWD$./a.out
> ld.so.1: ./a.out: fatal: libstdc++.so.2.10.0: open failed: No 
> such file or directory
> Killed
> 
> So what should I do?

Oops. I do know the answer to this one :-) I just didn't read your other
mails properly.

You need to add the location of the c++ runtime library to your
LD_LIBRARY_PATH environment (or create one if you don't have one). If
you built gcc yourself, this will be ${prefix}/lib (by default,
/usr/local/lib). If you installed the sunfreeware package, this will be
/opt/gcc/lib or similar.

Rup.


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