Boost logo

Boost :

From: Rodolfo Lima (rodolfo_at_[hidden])
Date: 2003-09-17 14:58:42


I'm using lambda in my project and I'm getting the following linker errors:

stdafx.obj : error LNK2005: "class lambda_functor<struct
boost::lambda::placeholder<1> >::boost::lambda_functor<struct
boost::lambda::placeholder<1> > const & const boost::lambda::`anonymous
namespace'::_1"
(?_1@?A0x2ef08265_at_lambda@boost@@3ABV?$lambda_functor_at_U?$placeholder@$00_at_lamb
da_at_boost@@@23_at_B) already defined in Alloc.obj

stdafx.obj : warning LNK4006: "class lambda_functor<struct
boost::lambda::placeholder<1> >::boost::lambda_functor<struct
boost::lambda::placeholder<1> > const & const boost::lambda::`anonymous
namespace'::_1"
(?_1@?A0x2ef08265_at_lambda@boost@@3ABV?$lambda_functor_at_U?$placeholder@$00_at_lamb
da_at_boost@@@23_at_B) already defined in Alloc.obj; second definition ignored

Although I'm using this lambda::_1 in other places cpp's, the linker
complains only with this use inside Alloc.cpp. What can be causing this?

This is the way I use lambda in Alloc.cpp:

using namespace boost;
using namespace std;
for_each(m_vpData.begin(), m_vpData.end(),
lambda::bind(lambda::delete_ptr(), lambda::_1))
(m_vpData's type is std::vector<unsigned long *>)

Thanks,
rod

PS: i should have posted this message in boost-users, but although I'm
subscribed to that list, my messages are being rejected. I'm trying to fix
this.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk