|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-11-29 13:44:22
Alo Sarv wrote:
> I'v been compiling boost libraries objects straight into my
> application binaries on linux and OSX platforms (e.g. not using
> bjam/stat/dynlibs), and thus far it has worked. However, recently I
> started getting multiply defined symbols on OSX, namely _1, _2, _3
> etc. Most likely they come between Boost.Function and Boost.Signals
> libraries (latter of which I started using recently).
_1, _2 and so on can come from either Boost.Bind or Boost.Lambda. If you are
using Boost.Bind, these are defined in <boost/bind/placeholders.hpp>. Take a
look at this file, and you'll see three different compiler-specific paths,
of which you are probably using the last (g++ on OSX, right?)
Since the placeholders are defined in an unnamed namespace, there shouldn't
be any multiple definition errors, so it's probably a compiler bug. Check
whether you have two source files with the same name, as this may be the
cause. Otherwise, as a last resort, you may try editing placeholders.hpp so
that one of the other #ifdef sections is selected.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net