Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: art1221 on October 08, 2013, 09:56:48 pm

Title: CodeBlocks and Boost setup, something missing ....
Post by: art1221 on October 08, 2013, 09:56:48 pm
Boost installed fine with gcc, but some strange error persist,
I can't see what I have setup wrong with CodeBlocks ...

In Settings ---> Global Variable:

base     C:\boost_1_54_0
include C:\boost_1_54_0\boost
lib        C:\boost_1_54_0\stage\lib

In current project Build Options:

Search Directories:

Compiler:

$(#boost.include)
C:\boost_1_54_0
C:\boost_1_54_0\boost


Linker:

$(#boost)
$(#boost.lib)
C:\boost_1_54_0\libs
C:\boost_1_54_0\stage\lib

Linker Settings --> Link libraries

libboost_filesystem-mgw48-1_54
libboost_system-mgw48-1_54

And the test program is:

#include <boost/filesystem.hpp>
#include <iostream>

int main()
{
  boost::filesystem::path p("C:\\Windows\\System");
  std::cout << p.string() << std::endl;
  std::cout << p.file_string() << std::endl;
  std::cout << p.directory_string() << std::endl;
}

The boost error is:

C:\boost_1_54_0\boost\system\error_code.hpp|240|  required
 by substitution of
'template<class ErrorConditionEnum>
boost::system::error_condition::error_condition(ErrorConditionEnum,
typename boost::enable_if<boost::system::is_error_condition_enum
<ErrorConditionEnum> >::type*)
[with ErrorConditionEnum = boost::system::error_condition]'|

Update:

I can compile code with boost libraries only if I restart CodeBlocks before a compile. Any ideas how to fix that?









Title: Re: CodeBlocks and Boost setup, something missing ....
Post by: oBFusCATed on October 08, 2013, 11:06:46 pm
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Also please use code tags to surround long pasted text.
Title: Re: CodeBlocks and Boost setup, something missing ....
Post by: stahta01 on October 09, 2013, 01:48:10 am
Did you build boost with the exact compiler you are trying to link the boost libs?

If not, I suggest NOT trying to use Boost Libs till you do so.

Also, please read the rules! http://forums.codeblocks.org/index.php/topic,9996.0.html (http://forums.codeblocks.org/index.php/topic,9996.0.html)

Tim S.