I tried to compile 1.55 boost libraries using Ubuntu 12.04. The compiled boost libraries does not allow me to use boost::thread or boost::mutex.
When I look inside the boost/thread/mutex.hpp, the preprocessor fall into:
#error "Boost threads unavailable on this platform"
The same go to boost/thread/thread_only.hpp.
I followed the default compilation option from 1.55 boost.
$ ./bootstrap.sh --prefix=ubu_linux
$ ./b2 install
I also tried clang. Same result. My gcc -v result following:
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)
But I noticed that boost build itself using gcc-4.6. I not sure if this cause the problem or not. Which step I missed out that cause my boost do not build the boost::thread library properly? I also moved my boost include folder into /usr/include/, same result. However, I noticed that the ubuntu repo boost libraries, does not have the same problem.
Anyone can correct me how to compile this boost library with thread properly? I want to compile myself and use the latest boost library.