Building Boost as shared release only libraries
|
1 2 |
./bootstrap ./bjam -j 24 --variant=release --link=shared --threading=multi --stagedir=. --layout=versioned |
|
1 2 |
./bootstrap ./bjam -j 24 --variant=release --link=shared --threading=multi --stagedir=. --layout=versioned |
Dotyczy Boost 1.56. I Android NDK r10b W katalogu tools\build\src\ umieścić plik user-config.jam (przykładowy znajduje się w \tools\build\example\) o następującej treści:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import os ; androidNDKRoot = e:/Android-SDK/android-ndk-r10b ; # put the relevant path using gcc : android : $(androidNDKRoot)/standalone-toolchain/bin/arm-linux-androideabi-g++ : <compileflags>--sysroot=$(androidNDKRoot)/platforms/android-19/arch-arm <compileflags>-mthumb <compileflags>-Os <compileflags>-fno-strict-aliasing <compileflags>-O2 <compileflags>-DNDEBUG <compileflags>-g <compileflags>-lstdc++ <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include <compileflags>-I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include <compileflags>-D__GLIBC__ <compileflags>-D_GLIBCXX__PTHREADS <compileflags>-D__arm__ <compileflags>-D_REENTRANT <archiver>$(androidNDKRoot)/standalone-toolchain/bin/arm-linux-androideabi-ar <ranlib>$(androidNDKRoot)/standalone-toolchain/bin/arm-linux-androideabi-ranlib ; |
Kompilację uruchomić jako:
|
1 |
b2 --without-python --without-mpi --without-serialization threading=multi link=static runtime-link=static toolset=gcc-android target-os=linux threadapi=pthread --stagedir=android stage |
HPC Pack 2012 R2 MS-MPI Redistributable Package HPC Pack 2012 Client Utilities Redistributable Package HPC Pack 2012 SDK with Service Pack 1 Wyedytuj user-config.jam:
|
1 2 3 4 |
using mpi : : <include>"c:/Program Files/Microsoft MPI/Inc" <library-path>"c:/Program Files/Microsoft MPI/Lib/i386" <find-shared-library>msmpi ; |
string w postaci: (0,0), (0.01,0), (0.01,0.01) zamieniony na tablicę obiektów typu punkt (x,y)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
void TokenizeVectorOfPoints(std::vector<Point<2>>& pointsVector){ boost::regex re("(\\((.*?),(.*?)\\).*?)+"); std::string s = _project->heatTransferProbePoints; boost::sregex_iterator it(s.begin(), s.end(), re); boost::sregex_iterator end; for (; it != end; ++it) { double x, y; try { x = boost::lexical_cast<double>((*it)[2]); y = boost::lexical_cast<double>((*it)[3]); } catch (boost::bad_lexical_cast const&) { x = 0; y = 0; } pointsVector.emplace_back(Point<2>(x,y)); } } |
Rozwiązanie: Oddzielnie zbudować wersję Release i Debug ./bjam -j 24 toolset=gcc threading=multi variant=release –stagedir=. –layout=versioned –build-type=complete –with-mpi
Do pliku: {BOOST_ROOT}\tools\build\v2\user-config.jam należy dopisać: using mpi : : <include>”c:/Program Files (x86)/MPICH2/include” <library-path>”c:/Program Files (x86)/MPICH2/lib” <find-shared-library>mpi <find-shared-library>mpe <find-shared-library>cxx ;
Windows x86
|
1 |
bjam.exe -j 4 toolset=msvc --build-type=complete threading=multi architecture=x86 address-model=32 --without-python --without-graph_parallel --stagedir=. |
Windows x86 + Boost::Log
|
1 |
bjam.exe -j 4 toolset=msvc --build-type=complete threading=multi architecture=x86 address-model=32 --without-python --without-graph_parallel --with-log define=BOOST_LOG_USE_CHAR define=BOOST_LOG_USE_WINNT6_API --stagedir=. |
Linux x86
|
1 |
./bjam -j 24 --build-type=complete threading=multi architecture=x86 address-model=32 --with-log define=BOOST_LOG_USE_CHAR --stagedir=. --layout=versioned |
Linux x64
|
1 |
./bjam -j 24 toolset=gcc threading=multi --stagedir=. --layout=versioned --with-log define=BOOST_LOG_USE_CHAR --build-type=complete |
Do pliku: tools\build\v2\user-config.jam dodać:
|
1 2 3 4 5 6 7 8 |
using mpi : mpicxx : <include>c:/OpenMPI/include <library-path>c:/OpenMPI/lib <define>OMPI_IMPORTS <define>OPAL_IMPORTS <define>ORTE_IMPORTS <variant>release:<find-shared-library>libmpi_cxx <find-shared-library>libmpi <find-shared-library>libopen-pal <find-shared-library>libopen-rte <variant>debug:<find-shared-library>libmpi_cxxd <find-shared-library>libmpid <find-shared-library>libopen-pald <find-shared-library>libopen-rted ; |