Boost logo

Boost Testing :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-07-03 09:07:56


        I'm CC'ing you on this discussion because it looks like a name
mangling bug in the latest Sun C++ compiler. The linker produces this
error message:

Undefined???first referenced
  symbol ??? in file
const char*boost::date_time::nth_as_str(int) /home/user1/dgregor/
ld: fatal: Symbol referencing errors. No output written to /home/

Grepping for nth_as_str in the library, we see two symbols:

-bash-2.05b$ nm |grep
0002628c D $XAsX$TB_yJqEWnE.__1cFboostJdate_timeL_nth_as_str_
00013ad8 T __1cFboostJdate_timeKnth_as_str6Fki_pkc_

I don't know what that first symbol is, but the second one is clearly
what we want:

-bash-2.05b$ c++filt
const char*boost::date_time::nth_as_str(const int)

The problem is that the compiler is putting "const" into the mangled
name for the definition, but it shouldn't be there.

Jeff, it looks like you can work around this bug by removing "const"
from "const int ele" in src/gregorian/date_generators.cpp.


On Jul 1, 2006, at 12:53 PM, Jeff Garland wrote:

> These failures looks like it might be a setup / Jamfile issue.
> That symbol should be defined in the library. I'm a little rusty
> on my CC
> options, but it looks like the linking options may not be correct
> -- in
> particular, this looks odd to me:
> -Bdynamic -lrt -Bstatic -Bdynamic
> Any ideas?
> Jeff
> _______________________________________________
> Boost-Testing mailing list
> Boost-Testing_at_[hidden]

Boost-testing list run by mbergal at