
Hi all, Using the Boost.Test library on Windows (VC7.1) gives me the following error: libboost_unit_test_framework-vc71-mt-sgd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpmtd.lib(newop.obj) The same occurs when I use te /MDd memory model: libboost_unit_test_framework-vc71-mt-gd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in msvcprtd.lib(newop_s.obj) Any clues? Regards Hartmut

Hi all,
Using the Boost.Test library on Windows (VC7.1) gives me the following error:
libboost_unit_test_framework-vc71-mt-sgd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpmtd.lib(newop.obj)
The same occurs when I use te /MDd memory model:
libboost_unit_test_framework-vc71-mt-gd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in msvcprtd.lib(newop_s.obj)
Any clues?
Regards Hartmut
New components include overloaded global operator new. It shouldn't cause any problem (actually it doesn't for me in vc7.1 tests). Gennadiy

On 1/5/06 10:21 PM, "Gennadiy Rozental" <gennadiy.rozental@thomson.com> wrote: [Hartmut Kaiser <hartmut.kaiser@gmail.com> said earlier:]
Using the Boost.Test library on Windows (VC7.1) gives me the following error:
libboost_unit_test_framework-vc71-mt-sgd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpmtd.lib(newop.obj)
The same occurs when I use te /MDd memory model:
libboost_unit_test_framework-vc71-mt-gd-1_34.lib(exception_safety.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in msvcprtd.lib(newop_s.obj)
Any clues?
New components include overloaded global operator new. It shouldn't cause any problem (actually it doesn't for me in vc7.1 tests).
Two of the four regression tests for rational on VC 7.1 fail to link from the same error. The other two tests fail from not finding the Boost.Test library during its link search, so it may be a variant symptom of the same problem. Check out Boost.Rational part of the report at <http://engineering.meta-comm.com/boost-regression/CVS-HEAD/developer/issues html>, hopefully for time-stamp "Fri, 6 Jan 2006 22:39:09 +0000". (Actually, I had an earlier time, but the page updated while I was double-checking it for writing this message.) -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

Gennadiy Rozental wrote>
New components include overloaded global operator new. It shouldn't cause any problem (actually it doesn't for me in vc7.1 tests).
Do you want me to submit a simple test case reproducing this error, perhaps?
Regards Hartmut
Patch would even be better.
Sorry, I currently don't have the time to dig through this. And as Daryle pointed out, you have a simple test case here: http://tinyurl.com/anv5e. Regards Hartmut
participants (3)
-
Daryle Walker
-
Gennadiy Rozental
-
Hartmut Kaiser