On Thu, 16 Aug 2001, Pedro Rosa wrote:

> >You are probably trying to link C++ objects with the C compiler (gcc).
> >
> Not the case as on old gcc things were working relatively. Well,
> compilation broke but due to other reasons, connected with the rawish
> C++ support on 2.96. But Apple warned about this.

What do you mean ?? Could you be more specific please ? I am sorry but I
still don't have mind reading capabilities. ;-)

> Well first I cant reach the https://qa.mandrakesoft.com (connection
> refused, it says). Second the stuff I am compiling is Apple Darwin
> Stream Server (build 338).

Is it supposed to work on non Darwin architectures ?

> An excerpt of the listing:
>
> usr/src/qtssServer-338/QTFileLib/QTAtom_stsz.cpp:120: undefined reference to 
>`operator new[](unsigned)'
> ../../QTFileLib/libQTFileLib.a(QTAtom_stsz.o): In function 
>`QTAtom_stsz::QTAtom_stsz(QTFile*, QTFile::AtomTOCEntry*, unsigned short, unsigned 
>short)':
> /usr/src/qtssServer-338/QTFileLib/QTAtom_stsz.cpp:69: undefined reference to `vtable 
>for __cxxabiv1::__si_class_type_info'
> /usr/src/qtssServer-338/QTFileLib/QTAtom_stsz.cpp:69: undefined reference to 
>`__gxx_personality_v0'

Your are definitely trying to link C++ objects with gcc instead of g++
(g++-3.0.1 in case you use it). See for example:

[gbeauchesne@thalys vrac]$ cat new.cpp
#include <typeinfo>

struct B1 { };
struct B2 { };

int main(void)
{
        if (typeid(B1()) == typeid(B2())) {
                char * tab = new char[100];
                delete[] tab;
        }
}

[gbeauchesne@thalys vrac]$ g++-3.0.1 -c new.cpp

[gbeauchesne@thalys vrac]$ gcc-3.0.1 new.o
new.o: In function `main':
new.o(.text+0x28): undefined reference to `operator new[](unsigned)'
new.o(.text+0x3f): undefined reference to `operator delete[](void*)'
new.o(.gnu.linkonce.d._ZTIF2B2vE+0x0): undefined reference to `vtable for
__cxxabiv1::__function_type_info'
new.o(.gnu.linkonce.d._ZTIF2B1vE+0x0): undefined reference to `vtable for
__cxxabiv1::__function_type_info'
new.o: In function `__FRAME_BEGIN__':
new.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

Please check your Makefile and/or whatever LD/LDFLAGS variables you have
to set.


Reply via email to