This is the mail archive of the 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]
Other format: [Raw text]

gcc says "undefined symbols", nm finds those symbols in the .so

Dear all,

here follows some strange behaviour using gcc, if someone has any idea to fix :-)

We have some strange link errors while linking some servers. Our code is linked
with Tibco Hawk 4.2 The following lines shows only errors on class AmiStatus but there
are others problems (btw all link errors are related to symbols present in

Compilers tested were gcc 3.2.2 and 3.4.2

Our source tree is also compilable on SunOS and AIX, using Hawk 4.2 libraries for those platforms.
Linking didn't produce any error ...

Is it a gcc bug ? are the Hawk libraries for linux broken ?

Whole gcc output on demand (12Mb)

meaningful details :

gcc link stage error messages [grep on AmiStatus]

/mylibpath/ undefined reference to `AmiStatus::AmiStatus(void*)'
/mylibpath/ undefined reference to `AmiStatus::getText()'
/mylibpath/ undefined reference to `AmiStatus::operator=(AmiStatus const&)'
/mylibpath/ undefined reference to `AmiStatus::setStatus(int, char const*, ...)'
/mylibpath/ undefined reference to `AmiStatus::AmiStatus()'
/mylibpath/ undefined reference to `AmiStatus::operator!=(void*)'
/mylibpath/ undefined reference to `AmiStatus::operator==(void*)'

additional gcc output obtained in link stage using -Wl,--trace,--print-map,--cref [grep on AmiStatus]

AmiStatus type_info function                      /mylibpath/ [is a B entry for nm]
AmiStatus virtual table                           /mylibpath/ [is a V entry for nm]
AmiStatus::~AmiStatus(void)                       /mylibpath/ [is a W entry for nm]
AmiStatus::AmiStatus()                            /mylibpath/ [is a T entry for nm]
AmiStatus::AmiStatus(void*)                       /mylibpath/ [is a T entry for nm]
AmiStatus::getText()                              /mylibpath/ [is a T entry for nm]
AmiStatus::operator!=(void*)                      /mylibpath/ [is a T entry for nm]
AmiStatus::operator=(AmiStatus const&)            /mylibpath/ [is a T entry for nm]
AmiStatus::operator==(void*)                      /mylibpath/ [is a T entry for nm]
AmiStatus::setStatus(int, char const*, ...)       /mylibpath/ [is a T entry for nm]
AmiStatus::~AmiStatus()                           /mylibpath/ [is a T entry for nm]
AmiStatus::~AmiStatus()                           /mylibpath/ [is a T entry for nm]
typeinfo for AmiStatus                            /mylibpath/
typeinfo name for AmiStatus                       /mylibpath/
vtable for AmiStatus                              /mylibpath/

nm -A on /mylibpath/, as you can see "undefined references" are not so undefined at all (T)

/mylibpath/ T AmiStatus::AmiStatus(void)
/mylibpath/ W AmiStatus::~AmiStatus(void)
/mylibpath/ T AmiStatus::AmiStatus(ami_ErrorCode)
/mylibpath/ T AmiStatus::AmiStatus(int)
/mylibpath/ T AmiStatus::AmiStatus(int, char const *)
/mylibpath/ T AmiStatus::AmiStatus(void *)
/mylibpath/ T AmiStatus::AmiStatus(AmiStatus const &)
/mylibpath/ T AmiStatus::operator=(ami_ErrorCode)
/mylibpath/ T AmiStatus::operator=(void *)
/mylibpath/ T AmiStatus::operator=(AmiStatus const &)
/mylibpath/ T AmiStatus::duplicateError(void)
/mylibpath/ T AmiStatus::operator==(ami_ErrorCode)
/mylibpath/ T AmiStatus::operator==(void *)
/mylibpath/ T AmiStatus::operator==(AmiStatus const &)
/mylibpath/ T AmiStatus::getCode(void)
/mylibpath/ T AmiStatus::getFile(void)
/mylibpath/ T AmiStatus::getLine(void)
/mylibpath/ T AmiStatus::getText(void)
/mylibpath/ T AmiStatus::getThread(void)
/mylibpath/ T AmiStatus::operator!=(ami_ErrorCode)
/mylibpath/ T AmiStatus::operator!=(void *)
/mylibpath/ T AmiStatus::operator!=(AmiStatus const &)
/mylibpath/ T AmiStatus::operator!(void) const
/mylibpath/ T AmiStatus::ok(void) const
/mylibpath/ T AmiAsyncMethod::sendError(AmiSubscription *, AmiStatus &)
/mylibpath/ T AmiStatus::setStatus(int, char const *,...)
/mylibpath/ T AmiStatus::setStatusV(int, char const *, void *)
/mylibpath/ T AmiStatus::stamp(char const *, int)
/mylibpath/ W AmiStatus type_info function
/mylibpath/ B AmiStatus type_info node
/mylibpath/ V AmiStatus virtual table

Any ideas ? Thanks in advance

David Denis
tel: +33 (0) 147 627 736

        Visit our Internet site at

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

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