Le 06/05/15 16:02, Ben Pope a écrit :
On Wednesday, May 06, 2015 07:55 PM, Vicente J. Botet Escriba wrote:
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
http://www.boost.org/development/tests/develop/developer/output/BenPope%20x8...
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?
Looks like you've hit this issue: https://llvm.org/bugs/show_bug.cgi?id=19660
Thanks for looking into this, Vicente