[boost 1.35][thread] Compile error with GCC 3.2

Dear members, I wrote an application using boost thread. It compiled well with GCC 3.4 but not with 3.2. I'm using Boost version 1.35. When I compile the application it shows the following error messages... /usr/local/include/boost-1_35/boost/config/requires_threads.hpp:47:5: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pt hreads (Solaris) or -mthreads (Mingw32)" /usr/local/include/boost-1_35/boost/thread/detail/platform.hpp:67:9: #error "Sorry, no boost threads are available for this platform." /usr/local/include/boost-1_35/boost/thread/thread.hpp:19:2: #error "Boost threads unavailable on this platform" /usr/local/include/boost-1_35/boost/thread/condition_variable.hpp:18:2: #error "Boost threads unavailable on this platform" /usr/local/include/boost-1_35/boost/thread/condition.hpp:13: syntax error before `;' token /usr/local/include/boost-1_35/boost/thread/mutex.hpp:18:2: #error "Boost threads unavailable on this platform" /usr/local/include/boost-1_35/boost/thread/once.hpp:18:2: #error "Boost threads unavailable on this platform" /usr/local/include/boost-1_35/boost/thread/once.hpp:23: type specifier omitted for parameter `once_flag' /usr/local/include/boost-1_35/boost/thread/once.hpp:23: syntax error before `&' token /usr/local/include/boost-1_35/boost/thread/once.hpp: In function `void boost::call_once(...)': The codes were compiled well with boost 1.32 but once I upgraded to 1.35, this error starts occurring. Any ideas or suggestions are welcomed and appreciated. best regards, Alex Kim

Alexander Dong Back Kim wrote:
Dear members,
I wrote an application using boost thread. It compiled well with GCC 3.4 but not with 3.2. I'm using Boost version 1.35.
When I compile the application it shows the following error messages...
Please follow the instructions in the error messages and turn on threading support in the compiler by specifying the appropriate compiler flags: for example by compiling with -pthread if you're on Linux (these command line options also work for later gcc versions, but don't really have any noticable effect). HTH, John.

On Mon, Sep 1, 2008 at 6:18 PM, John Maddock <john@johnmaddock.co.uk> wrote:
Alexander Dong Back Kim wrote:
Dear members,
I wrote an application using boost thread. It compiled well with GCC 3.4 but not with 3.2. I'm using Boost version 1.35.
When I compile the application it shows the following error messages...
Please follow the instructions in the error messages and turn on threading support in the compiler by specifying the appropriate compiler flags: for example by compiling with -pthread if you're on Linux (these command line options also work for later gcc versions, but don't really have any noticable effect).
After using -pthread for g++, all the error messages were magically disappered! I thought I have to use -pthread for boost compile option. Shame on my silliness. =( Thanks for your advice! regards, Alex Kim
participants (2)
-
Alexander Dong Back Kim
-
John Maddock