mgw64-release/obj/Tests/xuxu2.o:xuxu2.cc:(.text$_ZN5boost6threadD1Ev[_ZN5boost6threadD1Ev]+0x1a):
undefined reference to `InterlockedDecrement'
mgw64-release/obj/Tests/xuxu2.o:xuxu2.cc:(.text.startup+0xf6):
undefined reference to `InterlockedIncrement'
/usr/lib64/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld:
mgw64-release/obj/Tests/xuxu2.o: bad reloc address 0xf6 in section
`.text.startup'
collect2: error: ld returned 1 exit statusI have also made a minimal example so that anybody can test:
#include <iostream>
#include <boost/thread.hpp>
struct Runner {
void operator()() const { std::cout<<"Runner::operator()\n"; }
};
int main(int, char*[]) {
Runner r;
boost::thread t1(r);
t1.join();
return 0;
}
Cheers,
Frédéric