Code::Blocks Forums

User forums => Help => Topic started by: random_thinker on August 30, 2009, 04:38:57 pm

Title: Code::Blocks and boost error
Post by: random_thinker on August 30, 2009, 04:38:57 pm
Just installed C::B on Vista.  I was previously using VC++ with MSVC and had developed a project with boost::threads.

I've switched over to C::B and have added the libraries to the 'linker settings' and the boost source and my source directories to the 'search directories'.

Everything is fine until I try to use boost::threads.  There appears to be a problem with parsing the boost files.  I get the following error:

'syntax error :  missing ';' before 'namespace'

and this is followed by 80 errors from the same boost file.

This was not happening with VC++.  It compiled and ran fine.

This error occurs at the very first code line of the file:

namespace boost {
......

I noted that the VC++ was set to read unicode.  Is there a text parsing problem with the default compiler settings in C::B?  I just cannot figure out this weird error.

Any ideas?
Title: Re: Code::Blocks and boost error
Post by: random_thinker on August 30, 2009, 05:01:41 pm
Solved.  I needed to select the compiler option /EHs (for exception handling).

Now my problem is with the linker; it's looking for:

libboost_thread-vc90-mt-s-1_39.lib or libboost_thread-vc90-mt-sg-1_39.lib

and the actual available library is entitled:

libboost_thread-vc90-mt-gd-1_39.lib

Obviously another compiler setting problem.