I have problems with Code::Blocks configuration for Boost.
Description of problem:
1. During compilation of code supplied by Alpha, following error messages are appear (have no compilation problems if not using Boost)
a) C:\Program Files\CodeBlocks\Boost\include\boost-1_47\boost\lambda\detail\lambda_functor_base.hpp|227| [ skipping 6 instantiation contexts ]|
b) C:\Program Files\CodeBlocks\Boost\include\boost-1_47\boost\lambda\detail\operator_lambda_func_base.hpp:60|56|instantiated from 'boost::lambda::detail::binary_rt<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tuples::tuple<std::basic_ostream<char>&, boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::multiply_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> >, const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::nu|
c) C:\Program Files\CodeBlocks\Boost\include\boost-1_47\boost\lambda\detail\lambda_functors.hpp:202|50|instantiated from 'typename inherited::sig<boost::tuples::tuple<const A&> >::type boost::lambda::lambda_functor<Base>::operator()(const A&) const [with A = int, T = boost::lambda::lambda_functor_base<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tuples::tuple<std::basic_ostream<char>&, boost::lambda::lambda_functor<boost::lambda::lamb|
d) c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.5.2\include\c++\bits\stl_algo.h:4185|2|instantiated from '_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = std::istream_iterator<int>, _Funct = boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::bitwise_action<boost::lambda::leftshift_action>, boost::tuples::tuple<std::basic_ostream<char>&, boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boo|
2) Used software versions
a. Code::Blocks 10.05
b. MinGW 4.6
c. Boost 1.47.0
3) Boost libraries were built after several manipulations described below
a. In file
\boost_1_47_0\bootstrap.bat line
set toolset=msvc was replaced with line
set toolset=gcc b. In file
\boost_1_47_0\tools\build\v2\engine\build.bat under the procedure
:Guess_toolset updates the MinGW entry to point to the correct folder:
call :Clear_Error
if EXIST "C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe" (
set "BOOST_JAM_TOOLSET=mingw"
set "BOOST_JAM_TOOLSET_ROOT=C:\Program Files\CodeBlocks\MinGW\"
goto :eof)
c. In file
\boost_1_47_0\tools\build\v2\engine\build.bat, removed all other blocks of code similar to the above codeblock from the procedure
:Guess_toolset d. Compiled and Built the Boost C++ Library binaries
i. In CMD (command line) enter the command:
c:\boost_1_47_0\bootstrap.bat, it successfully built the executable
Bjam.exe ii. To build the Boost Library binaries entered command in CMD:
bjam --toolset=gcc --build-type=complete "--prefix=C:\Program Files\CodeBlocks\Boost" install
following Boost directories hierarchy was created:
c:\Program Files\CodeBlocks\boost\
lib (contain built libraries, only files with extension *.a)
include\boost-1_47\boost\... (header files and e.t.c)
4. Setting Code::Blocks
Global Variables a. In
Global Variable Editor defined new Variables
i. In
Current Set clicked on
New button and entered variable name
boost ii. In
Current Variable clicked on
New button and entered variable name
boost iii. In filed
base entered following path:
C:\Program Files\CodeBlocks\Boost\include\boost-1_47 iv. In field
lib entered following path:
C:\Program Files\CodeBlocks\Boost\lib5. Setting Code::Blocks
Project Build Options a. In
Project->Build options... i. Ensured that the overall name of the project is selected in the left-hand column
ii. In
Search directories tab
Compiler sub-tab filed entered
$(#boost) iii. In
Search directories tab
Linker sub-tab filed entered
$(#boost.lib)