
exe myname : myname.cpp : <include>. :<include>/usr/local/include/boost-1_39/ ;
On Wed, Jul 8, 2009 at 11:23 AM, McLemon, Sean
Try putting a space between the colon and "<include>/usr/local/...".
Sorry, that was a typo in my message here. In the Jamroot file, there was a
space.
On Wed, Jul 8, 2009 at 3:14 PM, Vladimir Prus
I don't think this is right. Per:
http://www.boost.org/boost-build2/doc/html/bbv2/advanced/targets.html
the syntax is:
rule-name ( main-target-name : sources + : requirements * : default-build * : usage-requirements * )
So you should have:
exe myname : myname.cpp : <include>. <include>/usr/local/include/boost-1_39/ ;
You might very well be correct in this but it works fine with and without the colon (some leniency in bjam, I assume).
You need to use project requirements in user-config.jam, see:
http://www.boost.org/boost-build2/doc/html/bbv2/advanced/projects.html
For example:
project user-config : requirements <include>/usr/local/include/boost-1_39 ;
Maybe we are talking about different user-config.jam files. I have put the entry 'using darwin ;' into the user-config.jam file sitting in /usr/share/boost-build as it is a project-independent settings (as would be the location of the libraries). I would not want to put any project-specific settings in this file. But without fully understanding it, I put your above-mentioned line into the user-config.jam file, it does not work (it complains about not finding the boost library, or more specifically the specific file I included in the header of my .cpp file). Trying out: project myprojectname : requirements <include>/usr/local/include/boost-1_39 ; also does not work. But I have now found another solution: I have put 'export BOOSTROOT="/usr/local/include/boost-1_39" (or the corresponding path on different machines) in my .bashrc file and ' <include>$BOOSTROOT'. They Jamroot file can now be the same on all machines. Markus