User forums > Using Code::Blocks

Using Boost libs

(1/1)

apgmr:
Code::Blocks and Boost libs.

Can anyone tell me how to set up Code::Blocks to use Boost libraries on a Windows system? I have installed and compiled the library set, and I followed the directions for global compiler-variables per the Code::Blocks web site. Yet, the compiler can never find the Boost header files. My setup is detailed below:

Boost Libs location: C:\Program Files\CodeBlocks\boost_1_44_0

In the .cpp file, I tried the following:
   #include <boost/regex.hpp>
   #include “boost/regex.hpp”
   #include <boost\regex.hpp>
   #include “boost\regex.hpp”

Setup in the Global Variable Editor:
   Current Variable: boostlibs (a new entry)
   Builtin Fields base: C:\Program Files\CodeBlocks\
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0

I have also tried the following:
   Builtin Fields base: C:\Program Files\CodeBlocks\boost_1_44_0
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0\libs
and
   Builtin Fields base: C:\Program Files\CodeBlocks\boost_1_44_0
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0

Any help would be greatly appreciated!

oBFusCATed:
You get the standard answer - read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

stahta01:
Please read and also turn on Full Compiler Logging as oBFusCATed suggested.

http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef#Add_Boost_search_directories_to_your_project

Note: Build Boost steps is not always needed; depends on library you are using.

Tim S.

apgmr:
Thanks for the advice.

stahta01: You nailed the problem. I made a simple entry into the search directories section, and the compiler was then able to find the header files.

Navigation

[0] Message Index

Go to full version