linker error: ld: cannot find -lstdc++
When trying to link as follows:
g++ -static -O3 -I -I/home/ofanan/gmp-4.1.4 -I. -DGMP -L/usr/lib -L/home/ofanan/gmp-4.1.4 cdd_r.o cddrevs_r.o cddio_r.o cddarith_r.o cddpivot_r.o setoper.o gmp_init.o Integer.o Rational.o -o cddr+ -lstdc++ -lgmp
I get the error:
/usr/bin/ld: cannot find -lstdc++
though I indeed have the following libraries under /usr/lib:
libstdc++.so.5@
libstdc++.so.5.0.5*
libstdc++.so.6@
libstdc++.so.6.0.3*
And I set within the Makefile:
LIBDIR = /usr/lib
I have also /usr/lib found in PATH and LIB variables (is it necessary, BTW?)
Actually, I found a few more libstdc++ libraries in other directories, which also should be recognized (I think) by g++.
I use gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
|