* Linking shared library, undefined symbol __pure_virtual
@ 2004-11-01 19:29 Kris Munch
0 siblings, 0 replies; only message in thread
From: Kris Munch @ 2004-11-01 19:29 UTC (permalink / raw)
To: gcc-help
Hello -
I have a legacy c++ function that I need to link into
a shared library, so that a c function can call it.
The c function is them called from within oracle using
extproc (external procedure). I can use the c++ and c
library from an executable that I compile using g++,
but oracle is having trouble calling the c++ function,
and gives this error:
"undefined symbol __pure_virtual".
I assume this has to do with linking the c++ library.
I have tried many different command for this,
including using ld and g++. This is the ld command I
tried:
/usr/bin/ld -shared
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../..
-L/usr/oracle/OraHome1/lib
-L/usr/oracle/OraHome1/lib/krm
-o libaddimgs.so addimgs.o
/usr/oracle/OraHome1/lib/libpls9.a
-lgcc -lstdc++ -lm -lgcc -lc -lgcc -lclntsh
-lpsyimg `cat /usr/oracle/OraHome1/lib/sysliblist`
-ldl -lm
-rpath
/usr/oracle/OraHome1/lib/krm:/usr/oracle/OraHome1/lib
I have also tried this g++ command:
g++ -shared -o libaddimgs.so -lc addimgs.o -lpsyimg
-L/usr/oracle/OraHome1/lib
-L/usr/oracle/OraHome1/lib/krm -lpthread -lm -ldl
-lstdc++ -lm -lgcc -lc -lgcc
THe ld command is the one that gives __pure_virtual
error. When i try to use the g++ command, I get an RPC
connection error, which basically means the call to
the function crashed/failed.
I can nm libgcc.a and see the __pure_virtual symbol. I
am linking in -lgcc in my command, so it should find
it.
ANy ideas?
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-01 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-01 19:29 Linking shared library, undefined symbol __pure_virtual Kris Munch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).