[MOAB-dev] Re: Problems linking to MOAB

Jason Kraftcheck kraftche at cae.wisc.edu
Tue Aug 12 11:03:12 CDT 2008


Neil Hodge wrote:
>>>
>>> I am getting the following error:
>>>
>>> ld: 0711-317 ERROR: Undefined symbol:
>>> .MBRange::subset_by_type(MBEntityType)
>>>
>>> Although, when I check libMOAB with nm and dump, subset_by_type is
>>> clearly there.
>>>
>>> I am trying this on AIX.  Any thoughts?
>>>

One possiblity:  in MBRange.hpp the function is declared as
  MBRange subset_by_type(MBEntityType)
while in MBRange.cpp it is
  MBRange subset_by_type(const MBEntityType)

Many compilers ignore the difference (because there really is no difference
in the assembly code, just a limit enforced by the compiler on the code
implemented the function.)  The IBM compiler appears to ignore the
difference also.  However, it may mangle the names differently.  If this is
the problem, then it is a compiler bug (in addition to a MOAB one).  If the
two declarations are not the same then the compiler should error out when
there is no form matching the latter in the declaration of the MBRange
class.  Anyway, I fixed this discrepancy in the SVN repo.

- jason




More information about the moab-dev mailing list