Author Topic: CodeBlocks and Boost setup, something missing ....  (Read 5138 times)

Offline art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
CodeBlocks and Boost setup, something missing ....
« 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?









« Last Edit: October 10, 2013, 07:26:31 am by art1221 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: CodeBlocks and Boost setup, something missing ....
« Reply #2 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

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org