News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Using Boost libs

Started by apgmr, December 28, 2010, 11:56:25 PM

Previous topic - Next topic

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

(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

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.
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]

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.