Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-11 08:07:40

From: "Ralf W. Grosse-Kunstleve" <rwgk_at_[hidden]>
> I am a heavy user of the Boost.Python library on a variety of
> platforms. Recently I started getting strange "unresolved symbol"
> warnings from the Compaq Tru64 cxx linker, followed by "unresolved
> symbol" run-time errors from dlopen(). For example:
> ld:
> Warning: Unresolved:
> <unnamed namespace>::_1
> <unnamed namespace>::_2
> ImportError: dlopen: symbol
> unresolved
> Since the exact same code works on several other platforms (Unices and
> Windows) I thought this must be a linker bug. Therefore I sent a bug
> report to Compaq c/c++ compiler team. They quickly responded and
> actively investigated the problem. After some back and forth they just
> sent me this message:
> > _1 is defined in boost/boost/bind/placeholders.hpp.
> >
> > I'm guessing that either this should be made static or it should be
> > made extern and the definition should be put in a .cpp file.
> I am lost here. Could someone please advise?

Their response isn't of much help. :-)

The problem you are experiencing is likely caused by a "broken" precompiled
header implementation that doesn't handle variable definitions in an unnamed
namespace. Borland C++ and MSVC 6 have the same problem; look at
placeholders.hpp and try the alternate paths, perhaps one of them will work
for Compaq.

> Related question: Is the use of symbols with leading underscores
> permitted by the ISO standard?

It's a bit borderline but it's permitted in this specific situation, yes.

Boost list run by bdawes at, gregod at, cpdaniel at, john at