bjam

Change boost.build jamfile for C++11 support?

拜拜、爱过 提交于 2019-12-08 17:30:36
问题 I have been using boost.build or b2 for building a project. I am trying to add C++11 contructs like auto and begin but the standard invokation b2 release in the directory with the Jamfile does not recognize these. 回答1: Added the following in Jamroot <toolset>gcc:<cxxflags>-std=gnu++0x <toolset>clang:<cxxflags>-std=c++11 Seems to be working 回答2: You need to tell the compiler to enable c++11 support For example, for gcc you can use b2 toolset=gcc cxxflags="-std=c++11" (or the same command with

How do I pass cxxflags to Boost libraries from within my jamfile?

穿精又带淫゛_ 提交于 2019-12-08 08:35:23
I have a project with some requirements, one of which is to set the c++11 compiler/linker flags: jamroot.jam: project : requirements <toolset>clang:<cxxflags>"-stdlib=libc++ -std=c++11" <toolset>clang:<linkflags>"-lc++" # ... etc ; lib mylibrary : #sources [ glob source/*.cpp ] /boost/filesystem /boost/system /boost/thread//boost_thread ; The library-specific sources are being compiled with the necessary c++11 flags, however the Boost libraries mentioned do not . This is causing no end of binary incompatibilities and linker errors. I do not want to specify the cxxflags explicitly in either the

Build Boost 1.45 using MinGW

不羁岁月 提交于 2019-12-05 13:41:44
Try to compile Boost 1.45 on Windows XP using MinGW. I did it a year ago and almost forgot how to repeat it. %PATH% contains MinGW path. user-config.jam contains using gcc ; bjam (the ntx86 one) from here . Output: <path> > bjam --build-dir="E:\Boost" --build-type=complete toolset=gcc stage <path>/tools/build/v2/build\configure.jam:145: in builds-raw *** argument error * rule UPDATE_NOW ( targets * : log ? : ignore-minus-n ? ) * called with: ( <pbin.v2\libs\regex\build\gcc-mingw-4.4.1\debug>has_icu.exe : : ignore-minus-n : ignore-minus-q ) * extra argument ignore-minus-q (builtin):see

How to change include path using bjam

╄→尐↘猪︶ㄣ 提交于 2019-12-04 19:23:38
I have the following directory structure: APPDIR/ APPDIR/APPHDRS (has *.h) APPDIR/APPLIBSRCS (has *.cpp need to make a library, say libtest.a) APPDIR/APPMAIN (has main.cpp that will compile if g++ gets args -I $HOME/APPINSTALLDIR and -L $HOME/APPINSTALLDIR/LIB ) I got headers to be installed by adding in APPDIR/Jamroot : local headers = [ path.glob-tree $HOME/APPDIR : *.h ] ; install headers : $(headers) : <location>$HOME/APPINSTALLDIR <install-source-root>$HOME/APPDIR ; Could someone please assist me in the Jamfiles for the libtest.a and main.cpp? In my jamroot.jam I have something like

How to build boost static libs?

久未见 提交于 2019-12-04 17:42:16
问题 This works, but doesn't build static versions of boost libraries (maybe i am wrong?) bjam --toolset=gcc --prefix=C:\boost_1_49_0-mingw install Trying to issue folloving command: bjam --toolset=gcc --prefix=C:\boost_1_49_0-mingw --build-type=complete install but it doesn't work. 回答1: You should be able to use the link=static option to let you compile the library into your binary without needing the dynamic lib: sudo ./b2 link=static Check your stage directory to make sure it goes in the right

Getting a buildable Boost extract with bcp

大兔子大兔子 提交于 2019-12-03 13:59:07
问题 I'm using bcp to extract Boost.Archive from Boost. Unfortunately I can't build this extract. Boost.Archive is not a header-only library. bjam complains Unable to load Boost.Build: could not find "boost-build.jam" Is there any way to tell bcp to make the extract buildable with bjam (copy boost-build.jam to the right place)? 回答1: The right place would be any parent directory of the directory where you have extracted Boost.Archive (or that directory itself). That file shall contain a single line

Building boost under msys, can't find mingw.jam

做~自己de王妃 提交于 2019-12-03 11:05:16
I need to build boost to use the regex library. I was able to creat bjam using bootstrap.sh like so: ./bootstrap.sh --with-toolset=mingw Note - if I leave out the --with-toolset=mingw argument compilation fails - bootstrap can't find wait.h, resource.h, ar.h. With the mingw toolset argument, bjam is able to compile. Then I run bjam and get: ./bjam.exe mingw.jam: No such file or directory e:/libraries/boost_1_45_0/tools/build/v2/build\toolset.jam:38: in toolset.using rule mingw.init unknown in module toolset. e:/libraries/boost_1_45_0/tools/build/v2/build\project.jam:881: in using project

Getting a buildable Boost extract with bcp

梦想与她 提交于 2019-12-03 03:55:57
I'm using bcp to extract Boost.Archive from Boost. Unfortunately I can't build this extract. Boost.Archive is not a header-only library. bjam complains Unable to load Boost.Build: could not find "boost-build.jam" Is there any way to tell bcp to make the extract buildable with bjam (copy boost-build.jam to the right place)? The right place would be any parent directory of the directory where you have extracted Boost.Archive (or that directory itself). That file shall contain a single line: boost-build /path/to/boost/tools/build/v2 ; where /path/to/boost needs to be substituted appropriately.

Building Boost for static linking (MinGW)

天涯浪子 提交于 2019-12-02 14:10:42
I'm building Boost (I'm using System and FileSystem) for MinGW using bjam: bjam --toolset=gcc stage And it builds fine, but I want to be able to statically link to it (I have to have a single file for the final product) so I tried: bjam --link=static --toolset=gcc stage But I get the same output. Any ideas? edit second question in a row I've answered moments after posting :p guess I'll leave this up here for others though. bjam --build-type=complete --toolset=gcc stage Will build both dynamic and static for sure. I think link is a property as opposed to an option for bjam. That means that

how to determine value of cxxflags in bjam? Or append to it?

╄→гoц情女王★ 提交于 2019-12-01 04:10:30
I need to add to compiler flags using bjam. So either I need a way to append to the existing flags -- like CXXFLAGS+=whatever using gmake -- or I need to know the currently-used value of cxxflags so I can replace it with my additions. As usual, the documentation leaves me astonished at the complexity of bjam but no closer to being able to do anything useful with it. If you are only looking to do this on the command line you can add flags by specifying "feature=value" arguments. In the case of the make CXXFLAGS the corresponding would be "cxxflags=--some-option". Refer to the Boost Build docs