boost::bind placeholders and MSVC .NET 2003 and .pch
I have linker errors using bind placeholders. The problem is when it is used in more than one .cpp file, and precompiled headers are on (as usual - created in stdafx.cpp and used in other modules) the linker says following: error LNK2005: "class boost::arg<1> `anonymous namespace'::_1" (?_1@?A0x51895292@@3V?$arg@$00@boost@@A) already defined in jc.obj When precompiled headers are off, everything works right. _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
Vladimir Suhoy wrote:
I have linker errors using bind placeholders. The problem is when it is used in more than one .cpp file, and precompiled headers are on (as usual - created in stdafx.cpp and used in other modules) the linker says following:
error LNK2005: "class boost::arg<1> `anonymous namespace'::_1" (?_1@?A0x51895292@@3V?$arg@$00@boost@@A) already defined in jc.obj
When precompiled headers are off, everything works right.
Could you please remove the " && BOOST_MSVC <= 1300" version check from line 41 of boost/bind/placeholders.hpp and tell us whether this fixes the problem? You might also want to report it to Microsoft as a bug, this was supposed to be fixed for VC 7.1.
participants (2)
-
Peter Dimov
-
Vladimir Suhoy