test: using floating_point_comparison.hpp in precompiled header
I don't know if this is a bug or not, but using boost/test/floating_point_comparison.hpp in a precompiled header under VC71 on Windows yields multiply defined symbol errors for each file using it. The workaround is to not use it in a precompiled header but only in the source files where it is needed. Any ideas? Linking... stdafx.obj : error LNK2005: "struct check_is_close_t::boost::check_is_close_t boost::test_tools::`anonymous namespace'::check_is_close" (?check_is_close@?A0x5e8fa061@test_tools@boost@@3Ucheck_is_close_t@23@A) already defined in TestExample.obj ..\..\..\..\..\bin\Debug.NET\Test.exe : fatal error LNK1169: one or more multiply defined symbols found
I don't know if this is a bug or not, but using boost/test/floating_point_comparison.hpp in a precompiled header under VC71 on Windows yields multiply defined symbol errors for each file using it. The workaround is to not use it in a precompiled header but only in the source files where it is needed. Any ideas?
Linking... stdafx.obj : error LNK2005: "struct check_is_close_t::boost::check_is_close_t boost::test_tools::`anonymous namespace'::check_is_close" (?check_is_close@?A0x5e8fa061@test_tools@boost@@3Ucheck_is_close_t@23@A) already defined in TestExample.obj ..\..\..\..\..\bin\Debug.NET\Test.exe : fatal error LNK1169: one or more multiply defined symbols found
I am not quite sure how PH machinery works but boost::test_tools::`anonymous namespace'::check_is_close could not be multiply defined (see namespace) Gennadiy
I don't know if this is a bug or not, but using boost/test/floating_point_comparison.hpp in a precompiled header under VC71 on Windows yields multiply defined symbol errors for each file using it. The workaround is to not use it in a precompiled header but only in the source files where it is needed. Any ideas?
I suspect the mention of an anomymous namespace may be a clue here: precompiled headers probably use the same mangled name for all translation units, which would not be std conforming behaviour. John.
participants (3)
-
Gennadiy Rozental
-
John Maddock
-
Matt Amato