using gcc 4.5.1 in a 64bit x86 machine,I first create a.o as following: g++ -fPIC -c a.cc -o a.o
then try to create liba.so as following: g++ -static-libstdc++ -shared -W1,-soname,liba.so -o liba.so.1.0.0 a.o
but failed, with the following information: relocation R_X86_64_32S against `vtable for __gnu_cxx::stdio_filebuf >' can not be used when making a shared object; recompile with -fPIC
I try to recompile libstdc++ library,with -fPIC added,but it failed anyway
g++ -fPIC -static-libstdc++ -shared -W1,-soname,liba.so -o liba.so.1.0.0 a.o
? – Flexo♦