I usually use -zdefs and -Bdirect to link libs and execs. Recently I tried C++ stuff (i.e. icu libs and graphite2), where I always get 2-4 messages like:
Undefined first referenced
symbol in file
vtable for __cxxabiv1::__si_class_type_info errorcode.o
[Hint: static member vtable for __cxxabiv1::__si_class_type_info must be defined in the program]
__cxxabiv1::zero_ints(void*,unsigned) messagepattern.o
operator delete(void*) uniset.o
vtable for __cxxabiv1::__vmi_class_type_info unifilt.o
[Hint: static member vtable for __cxxabiv1::__vmi_class_type_info must be defined in the program]
__dynamic_cast normalizer2.o
__cxxabiv1::vector_del(void*,unsigned,void (*)(void*)) locid.o
vtable for __cxxabiv1::__class_type_info errorcode.o
[Hint: static member vtable for __cxxabiv1::__class_type_info must be defined in the program]
__cxa_pure_virtual ustrenum.o
__cxxabiv1::vector_new(void*,unsigned,unsigned,void (*)(void*),void (*)(void*)) locid.o
__cxa_vec_dtor dictbe.o
__cxa_vec_ctor messagepattern.o
ld: fatal: symbol referencing errors
gmake[1]: *** [../lib/libicuuc.so.55.1] Error 2
Just in case, the cmd used
CC -std=c++03 -g -fsimple=1 -xlibmil -xlibmopt -m32 -xarch=sse3 -xdepend -xO4 -I/export/scratch -mt -m32 -L/export/scratch -xarch=sse3 -zdefs -Bdirect -lc -norunpath -staticlib=CrunG3 -G -h libicuuc.so.7 -o ../lib/libicuuc.so.55.1 errorcode.o .. uloc_keytype.o -L../lib -L../stubdata -licudata -lpthread -lm -mt
So I wonder, what's going wrong. Does the compiler produce something, what it later cannot resolve? Any hints, how to fix it?