News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

CodeBlocks and Boost setup, something missing ....

Started by art1221, October 08, 2013, 09:56:48 PM

Previous topic - Next topic

art1221

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?










oBFusCATed

(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!]

stahta01

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.next.codeblocks.org/index.php/topic,9996.0.html

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