building C++ shared libs for systems w/o gcc installed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to build a C++ shared lib using gcc/g++
3.2 on Solaris 8.
Everything works fine until I try to load it on a
machine that does not
have gcc installed at all, or has an older version
installed (2.95).
It complains that the library "libstdc++.so" isn't
found (indeed it is
not there).
 
So I want to link the shared lib with static linking
of the g++ runtime
libs.  I did this with the following link command:
 
g++ -shared -nodefaultlib $(OBJS)
/usr/local/lib/libstdc++.a /usr/local/lib/libsupc++.a
 
The link worked fine but when the program tries to
load (dlopen) the
shared lib, it fails with:
 
relocation error:  symbol __gxx_personality_v0:
referenced symbol not found
 
This symbol is in libstdc++.a but it doesn't get
copied into the shared lib.
Is there a way to force the linker to load everything
in libstdc++.a into the shared lib?
 
Are there any resources out there explaining how to
build C++ shared libs using
gcc/g++ for delivery to systems which don't have gcc
installed?


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux