[C++-sig] Re: VC++ 7.1 (VStudio.NET 2003) linking problem
David Abrahams
dave at boost-consulting.com
Thu Jul 3 23:12:56 CEST 2003
"Mike Rovner" <mike at nospam.com> writes:
> I'm trying to move my project from VC++ 7.0 to 7.1
> There was no problem under 7.0
>
> I have several classes to wrap separated to several source files, i.e.
>
> file1.cpp
> #include <boost/python.hpp>
> ...
> f(){
> class_<C1>("C1")...;
> }
>
> file2:
> #include <boost/python.hpp>
> ...
> class_<C0>("C0")...;
> f();
>
> When linking I got the following:
>
> error LNK2005: "class boost::arg<3> `anonymous namespace'::_3"
> (?_3@?A0x2264d27d@@3V?$arg@$02 at boost@@A) already defined in file1.obj
>
> repeating for every holder from _1 to _9.
>
> Googling and boost archive searching were unsuccessful.
> boost was taken from latest CVS.
> Any clues and/or links are very appreciated.
Mike,
Jason Shirk, a compiler engineer at Microsoft
(jasonsh-at-microsoft.com), says:
Hmm, I might need more info. I made a little test that shows the
same problem mentioned in those messages, but my little test fails
with VC6, VC7, VC7.1, and VC8.
It's possible that if I fix that problem I just found, the one
you've reported will go away. Still, it seems best to get a
repro.
So, please send him a reproducible test case.
Thanks,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list