0

I copied the boost hpp files under /usr/include/boost, the release version is 1.37.0 , and i also copied the threadpool hpp files under /usr/include/boost.

When running gcc quickstart.cpp -o test the compilation fails with the following output.

Compile log output:

$ g++ quickstart.hpp -o test
/tmp/cctYmYW8.o:quickstart.cpp (.text$_ZN5boost16thread_exceptionC2ERKS0_[boost::thread_exception::thread_exception(boost::thread_exception const&)]+0x1d): undefined reference to vtable for boost::thread_exception
/tmp/cctYmYW8.o:quickstart.cpp:(.text$_ZN5boost21thread_resource_errorC1ERKS0_[boost::thread_resource_error::thread_resource_error(boost::thread_resource_error const&)]+0x1d): undefined reference tovtable for boost::thread_resource_error'
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld:
/tmp/cctYmYW8.o: bad reloc address 0x1d in section `.text$_ZN5boost21thread_resource_errorC1ERKS0_[boost::thread_resource_error::thread_resource_error(boost::thread_resource_error const&)]' collect2: ld

Are the above steps correct?

yugr
  • 19,769
  • 3
  • 51
  • 96

0 Answers0