* Linking shared Objects with gcc 3.0.2 on True64 V5.1
@ 2002-01-14 15:37 Lars Sitzmann
0 siblings, 0 replies; only message in thread
From: Lars Sitzmann @ 2002-01-14 15:37 UTC (permalink / raw)
Hello,
I have trouble linking shared objects and applications using shared
objects
on a true64 V5.1 system with gcc 3.0.2 compiler.
I build the gcc 3.0.2 on my system with
configure && make bootstrap && make install
without any problems.
I compile my source files with statements like:
gcc -c -g -fPIC -Wall src/PROG1.cpp -o dst/PROG1.o
...
Then I link my shared object this way:
g++ -shared -nostartfiles -nostdlib -lc -lm dst/PROG1.o dst/PROG2.o
-lgcc -lpthread -lrt -o /lib/libMySharedLib.so.1 -lm
This produces no errors and an shared-object-file, but aswell warnings
like:
dst/PROG1.o: typeinfo for XXXXXX: weak symbol multiply defined
[...lots of these!!]
Warning: Unresolved:
operator new[](unsigned long)
operator delete(void*)
vtable for __cxxabiv1::__si_class_type_info
vtable for __cxxabiv1::__class_type_info
__gxx_personality_v0
operator new(unsigned long)
__cxa_pure_virtual
vtable for __cxxabiv1::__vmi_class_type_info
operator delete[](void*)
/bin/ld:
dst/PROG1.o: _ZTS8BSObject: weak symbol multiply defined
[... lots of these!!]
Warning: Unresolved:
_Znam
_ZdlPv
_ZTVN10__cxxabiv120__si_class_type_infoE
_ZTVN10__cxxabiv117__class_type_infoE
__gxx_personality_v0
_Znwm
__cxa_pure_virtual
_ZTVN10__cxxabiv121__vmi_class_type_infoE
_ZdaPv
Now, when I try to use my shared object like this:
gcc dst/hello_world.o -o testprogs/hello_world -Llib -g -lMySharedLib
I get the following error messages:
/bin/ld:
Unresolved:
operator delete(void*)
__gxx_personality_v0
collect2: ld returned 1 exit status
What am I doing wrong?
Under true64 V4.0 and gcc 2.95.3 everything works out fine
(using the same parameters).
Thanks for any suggestions and greetings from germany...
Lars
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-14 15:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-14 15:37 Linking shared Objects with gcc 3.0.2 on True64 V5.1 Lars Sitzmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox