Building basic Boost apps with bjam

I can find a ton of general-purpose documentation on Boost.Build, but surprisingly I can't say anything about how to use it to create simple Boost applications.

I compiled Boost for mingw with bjam, got all the libraries, and included it in C: \ Boost. Now, what does the main Jamroot file look like to use all of this?

All libs have complex names like "libboost_filesystem-mgw34-mt-s.lib", I'm sure there is some kind of magic switch somewhere to just say "link to libboost_filesystem"!

+3
source share
2 answers

Of course there are shortcuts! An example project might look like this:

#jamfile - an example Boost.Build project
exe my_exe : [ glob *.cpp ] /boost//filesystem ;

.cpp Boost.Filesystem. - boost , bjam . , boost, . Boost.Build , user-config.jam, boost-build.jam jamroot (, use-project /boost : /path/to/boost). , , . http://www.boost.org/boost-build2/doc/html/index.html

+6

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


All Articles