LINUX.ORG.RU

Ошибки при линковке


0

0

 Господа, кто-нибудь может рассказать что означают эти ошибки при сборке c поощью gcc-3.2.2:

app/libapp.a(metadatatree.o)(.text+0xa8): In function `CMetadataTree::CMetadataTree[not-in-charge]()':
/home/vinick/work/1L/w1xl/src/app/metadatatree.cpp:75: undefined reference to `vtable for CMetadataTree'
app/libapp.a(metadatatree.o)(.text+0x26e): In function `CMetadataTree::CMetadataTree[in-charge]()':
/home/vinick/work/1L/w1xl/src/app/metadatatree.cpp:75: undefined reference to `vtable for CMetadataTree'
app/libapp.a(metadatatree.o)(.text+0x425): In function `CMetadataTree::~CMetadataTree [not-in-charge]()':
/home/vinick/work/1L/w1xl/src/app/metadatatree.cpp:94: undefined reference to `vtable for CMetadataTree'

что такое undefined reference я знаю, но вот что значит vtable, [in-charge], [not-in-charge] и т.д.... и как с этим боротсься
★★

"The problem is that GCC emits two copies of a constructor: one that's called to initialize a direct instance of the class (the "in charge" constructor), and one to initialize the class's portion of an instance of some derived class (the "not-in-charge" constructor). They deal with virtual base classes differently, and there may be some other things. But GDB only sets a breakpoint in one copy --- whichever one appears first in the code."

"Lovely. I'll investigate; something is wrong with the changes I made to handling the `__in_chrg' parameter in destructors. The error message is a real relic."

С in-charge/not-in-charge разобрались... смотрим vtable...

"> Hi all. > > I just found out the hard way :) that there is an incompatibility in > the vtable layout of GCC 3.0.1 and GCC 3.2.2, see below. Can anybody > confirm whether this is a known issue (a deliberate change?), and > between which two GCC versions the change was introduced? I did not > find anything about this in the changes notes.

GCC 3.2 is binary incompatible on the C++ level to earlier releases - that's one of the reasons why we released it as 3.2. For details read this webpage:

http://gcc.gnu.org/gcc-3.2/changes.html";

Вот и нашли тебе ответ :) А вообще, гуглем надо пользоваться! :) "GCC vtable", "GCC in-charge error" - и все нашлось.

Так что проблема в бинарной несовместимости... :-/ Перебивай либы, или с чем ты там производишь связывание...

Spectr ★★★
()
Ответ на: комментарий от Spectr

Так о чем спросил, о том и ответили. Спасибо. про гугл я как-то не сориентирровался. Пытался вначале info мучать, но безуспешно. Теперь осталось разобраться как все это исправлять. :))

Vinick ★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.