This is the mail archive of the gcc-help@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]

Differences from gcc-2.95 to gcc-2.97


Hi
I would appreicate some help with the following problem. I have two
compilers on my Solaris 2.7 box, 2.95.2 and 2.97 (CVS snapshot
Jan. 2001). When I use gcc-2.95, my source code compiles and links;
however, with gcc-2.97, there are some undefined symbols. Here is the
output:

Undefined                       first referenced
 symbol                             in file
__cxa_pure_virtual                  ../../../tmp/objopt/iddscan/app.o
vtable for __cxxabiv1::__si_class_type_info../../../tmp/objopt/iddscan/app.o
vtable for __cxxabiv1::__vmi_class_type_info../../../tmp/objopt/iddscan/app.o
operator new[](unsigned)            ../../../tmp/objopt/iddscan/idd.o
vtable for __cxxabiv1::__class_type_info../../../tmp/objopt/iddscan/app.o
operator delete(void*)              ../../../tmp/objopt/iddscan/app.o
operator new(unsigned)              ../../../tmp/objopt/iddscan/app.o
operator delete[](void*)            ../../../tmp/objopt/iddscan/app.o
ld: fatal: Symbol referencing errors. No output written to myTarget
collect2: ld returned 1 exit status

Is this because I should link against a certain library with the -l
option? BTW, my arguments are:

gcc -Wl,-s -Wl,-Beliminate -L/usr/lib < a bunch of object files> -lm
-ldl -lposix4 -lthread -lsocket -lresolv -lnsl -o myTraget -Wl,-m

My compilers reside under /usr/local/gcc295 and /usr/local/gcc297. I
wrote a bash script that creates the necessary symbolic links under
/usr/local/bin, lib, include, etc. based on the desired compiler
version. But I don't change anything under /usr/lib, is that OK?

Thaks in advance for your help.

-Ezz


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