This is the mail archive of the gcc@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]
Other format: [Raw text]

undefined symbol __pure_virtual


Hi All,

I have an application built on Linux advanced server 2.1 m/c using gcc
2.96. On trying the run the application, following error is encountered:

cn't load /home/agent6/abc.so : undefined symbol __pure_virtual

This symbol is in the library is libgcc.a. gcc 2.96 does all the linking
with required libraries internally i.e libgcc is linked automtaically. I
also printed the compiler linking options using -v commad. The gcc
specific options are as below:

gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.1)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/collect2 -m elf_i386 -shared -o
/vobs/devel/web-agent/Code/Release/mod_sm.so
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbeginS.o
-L/vobs/devel/web-agent/Code/Release/
-L../../../../devel/web-agent/Release/Linux/lib
-L../../../../devel/common/Release/Linux/lib
-L../../../../devel/thirdparty/rsa-bsafe/crypto-c/6.04/redhat71/lib/redh
at71 -L../../Rosette30/unix/lib/RH21AS-g++-2.96
-L/usr/local/bsafe40/redhat/library/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96 -lpthread -lnsl -ldl -lstdc++
-lm -lc -lgcc -lc -lgcc
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtendS.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o


The symbols __pure_virtual is there in libgcc which is being linked with
our application, but still I am getting this error. So just to solve the
issue, i extraced _pure.o from libgcc.a & linked it specifically with
our application. On running the application again after linking with
_pure.o, the application library was loaded properly.

Why is the symbol not getting resolved when linking our application is
linked with libgcc.a? 
Is linking with _pure.o a correct method to get rid of this?

If no, then how can I get rid of this issue??

Regards,
Gagan


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