|
Boost Testing : |
Subject: [Boost-testing] BenPope x86_64 Ubuntu issue at link time
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-05-06 07:55:28
Hi,
I'm getting this link error
/usr/bin/ld: error:
/home/ben/development/boost/test/build/results/boost/bin.v2/libs/thread/test/thread__constr__FArgs_p_lib.test/clang-linux-3.7~asan~c14_libc++/debug/threading-multi/threads/thread/constr/FArgs_pass.o:
multiple definition of 'operator delete(void*)'
/usr/bin/ld:
/home/ben/development/llvm/trunk/install/release/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan_cxx-x86_64.a(asan_new_delete.cc.o):
previous definition here
at
I define it as follows
#if defined _GLIBCXX_THROW
void* operator new(std::size_t s) _GLIBCXX_THROW (std::bad_alloc)
#elif defined BOOST_MSVC
void* operator new(std::size_t s)
#else
void* operator new(std::size_t s) throw (std::bad_alloc)
#endif
{
std::cout << __FILE__ << ":" << __LINE__ << std::endl;
if (throw_one == 0) throw std::bad_alloc();
--throw_one;
return std::malloc(s);
}
Is this a compiler issue, or is my definition of the operator new incorrect?
Vicente