How to compile Boost.Process library?
So there is Boost.Process 2006, Boost.Process 2008 and most recent Boost.Process seems like 2009 by looking at sources)开发者_如何学运维 I need some kind of step by step guidance on how to compile that beast. Because I deffenetly do not get how to do such thing.
So For generall official Boost I understand what shall be done
With out administration privileges:
- Download latest Boost release.
- Unpack, extract downloaded content into some folder.
- Open that folder in terminal (for example you ca open 'cmd' or 'terminal' an use command like
cd absolute/path/to/directory/with/extracted/Boost
than use command to show folder contentsls
on Unix like OS (Mac, Linux) anddir
on Windows - in output you should be capable to findboost-build.jam
) - Create two folders (using command like
mkdir
foldername )build-dir
andinstall-dir
- run command
./booststrap
(booststrap.sh
orbooststrap.bat
on windows) - now we can compile Boost and install it with
./bjam -j4 link=static threading=single,multi --builddir=./build-dir install --without-mpi --prefix=./install-dir
- Such call will compile static libraries of Boost into
build-dir
. (you probably will not be capable to use Boost out from there - there will be no includes headers and a really big directories hierarchy ) - Than bjam will create for us "installation" of Boost into
install-dir
- there will appear folder with all boost libs (static version) and includes folder with all of boost headers. - We set -j4 flag to compile on 4 cores. use -j
N
whereN
is number of desired cores to be used during compilation process. - We set
--without-mpi
flag because we probably do not use it.
- Such call will compile static libraries of Boost into
But having Real Boost unpacked, compiled, installed in dir A (bjam is in folder B ) Having Boost.Process Download , Unpacked and Extracted to folder C how to compile any of that 3 Boost.Process releases (with out administration privileges)?
I did this once or twice and here's what I remember:
After downloading boost libs e.g. from the sandbox, unpack the lib onto the drive like you said e.g to folder C. If you open the C folder, it generally has the same folder structure as the rest of the boost source. At least this was the case in the limited libraries I tried.
From there copy the individual files and folders inside the extracted source folder into the corresponding folders in the boost source.
E.g. in the case of process - copy C/boost/process.hpp and C/boost/process/ to boost_src_dir/boost/ - copy C/libs/process/ to boost_src_dir/libs/.
From there execute bjam (assuming the bjam executable is on your path) again in the boost root and that in my cases built everything including the new library. I remember doing this with boost log and process and can't think of having to do anything else.
The downside to doing this is that everything gets recompiled. Perhaps someone else has a better method of doing this.
As for the admin priviledges, they shouldn't matter since you're building boost in the same manner that you built the original version.
精彩评论