linking: dwarf error: mangled line number section.
807575Mar 6 2007 — edited Mar 13 2007Hi,
I'm trying to get at 1st a unit test running (Suse 9.2, CC: Sun C++ 5.9 Linux_i386 Build35_2 2006/12/04). To keep things simple I start with only instantiation of a class of ccpunit:
int main(int argc, char* argv[] )
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
}
In linking I get this error message:
COM_TestMain.o(.text+0x10a3)/usr/bin/ld: Dwarf Error: mangled line number section.
: In function `main':
: undefined reference to `CppUnit::TestResult::TestResult(CppUnit::SynchronizedObject::SynchronizationObject*)'
COM_TestMain.o(.text+0x10af): In function `main':
: undefined reference to `CppUnit::TestResult::~TestResult()'
dmake: Fatal error: Command failed for target `test.bin'
I translated cppunit also from source level with sunstudio compiler, but it makes no difference. The mentioned symbols seems to be there (look into libcppunit.a with objdump). An interesting question also would be, why this lib (and others) only build the static targets?
Does anybody know, what that error means and how to workaround? I'll also continue to find out and tell here in case of success.
Ciao, Rolf