BOOST_MPL_ASSERT_MSG producing linking problems in MSVC++ 8.0

26 Aug
2008
26 Aug
'08
4:28 p.m.
Hello, I found the following problem when using BOOST_MPL_ASSERT_MSG under Visual Studio 2005 Express Edition: * Create a basic console project * Include files foo1.cpp and foo2.cpp (files attached) * Build; the following error shows up at linking time: >Linking... >foo2.obj : error LNK2005: "public: static struct boost::mpl::failed * * * * * * * * * * * * (__thiscall `bool __cdecl f<int>(void)'::`2' ::ALWAYS_TRUE::** * * * * * * * * * * __cdecl `bool __cdecl f<int> (void)'::`2'::ALWAYS_TRUE0::assert_arg(void))(int)" (?assert_arg@ALWAYS_TRUE0@?1???$f@H@@YA_NXZ@SAPAPAPAPAPAPAPAPAPAPAPAP8<mailto:?assert_arg@ALWAYS_TRUE0@?1???$f@H@@YA_NXZ@SAPAPAPAPAPAPAPAPAPAPAPAP8> ALWAYS_TRUE@?1???$f@H@@YA_NXZ@AEPAPAPAPAPAPAPAPAPAPAPAPAUfailed@mpl@boost@@H@ZXZ<mailto:ALWAYS_TRUE@?1???$f@H@@YA_NXZ@AEPAPAPAPAPAPAPAPAPAPAPAPAUfailed@mpl@boost@@H@ZXZ>) already defined in foo1.obj This duplication problem happens only when BOOST_MPL_ASSERT_MSG is used at function or member function level. At class level everything works OK. Has anyone seen this before? I've created a ticket for this issue: http://svn.boost.org/trac/boost/ticket/2262 Thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarollo
6132
Age (days ago)
6132
Last active (days ago)
0 comments
1 participants
participants (1)
-
JOAQUIN M. LOPEZ MUÑOZ