Increase build site-config.jam on gentoo

I am using boost build in my project and now I want to use boost_time. I googled and found that it should (probably) be used this way:

exe test : test.cpp /boost/date_time//date_time ; 

but then I get this message:

 error: Unable to find file or target named error: '/boost/date_time//date_time' error: referred from project at error: '.' 

(when I use -lboost_date_time as the gcc flag manually, then it works correctly) I thought the library should be added to site-config.jam, so I tried to add this:

 project /boost/date_time ; lib date_time ; 

but it does not affect.

What am I doing wrong?

Thaks

Edit: I'm not looking for a solution that just works. I need something that will work for everyone with the proper installation of boost.build and boost modules.

+4
source share
2 answers

I recommend that you take a look at the contrib / boost.jam module in current versions of Boost.Build. It allows you to automatically declare the necessary goals for each library.

Or the original attempt is not entirely correct. For "/ site-config // boost_date_time" to work, you need to have this in the site-config.jam file:

 project site-config ; searched-lib boost_date_time ; 

This will work on Linux if the library file is called libboost_date_time.so (this is the case if Boost was built with --layout = system). On Windows, you really don't need anything because of autorun.

+2
source

I do not have much experience with boost build, but I believe that your specifications in the site configuration are disabled (see here and here ). If you are trying to put the pre-configured boost_date_time in your config site, this should be:

 project site-config ; lib b_date_time : : <name>boost_date_time ; 

And in your directory:

 exe test : test.cpp /site-config//b_date_time ; 
+1
source

Source: https://habr.com/ru/post/1286295/


All Articles