0

I am trying to compile my program using b2 tool, I defined a Jamroot file as following to assist in the compilation. When I execute the command 'b2 toolset=gcc', I get multiple error stating that b2 can't find Boost header files like asio.hpp and bind.hpp:

So what am I missing in the Jamroot?

Should I add something in the requirement?

import os ;
import errors ;
import option ;
import path ;

project test
: requirements
    <link>static
    <toolset>gcc:<cxxflags>-std=c++0x
;

path-constant test-root : . ;

#
# Import the boost project
#
local boost-major = 1 ;
local boost-minor = 49 ;
local boost-patch = 0 ;
local boost-root ;

boost-root ?= [ option.get boost-root ] ;
boost-root ?= [ os.environ BOOST_ROOT ] ;

if ! $(boost-root) {
boost-root = [ path.join $(test-root) ../boost_$(boost-major)_$(boost-minor)_$(boost-patch) ] ;
}
use-project boost : $(boost-root) ;

#
# Build
#
exe test : 
main.cpp 
messagecpp
tcp_listener.cpp 
tcp_sender.cpp 
;

install install
: test
;
IoT
  • 607
  • 1
  • 11
  • 23

0 Answers0