Boost provides free peer-reviewed portable C++ source libraries. Ten Boost libraries are already included in the C++ Standards Committee’s Library Technical Report and will be in the new C++11 Standard. The Boost C++ libraries are already included in popular Linux and Unix distributions such as Fedora, Debian, Ubuntu and NetBSD and are used by projects such as Python, Xibo, Civilization IV, etc.. Here are the steps to cross-compile Boost C++ libraries for arm using arm-linux-guneabi-g++: Download the source code:
1 |
wget http://sourceforge.net/projects/boost/files/boost/1.47.0/boost_1_47_0.tar.bz2/download |
Extract the source code:
1 2 3 |
mv download boost.tar.bz2 tar xjvf boost.tar.bz2 cd boost_1_47_0/ |
Bootstrap the code:
1 |
./bootstrap.sh |
Modify the configuration file (project-build.jam) to use the ARM toolchain by replacing the line with “using gcc” by:
1 |
using gcc : arm : arm-linux-gnueabi-g++ ; |
Install the python development package:
1 |
sudo apt-get install python-dev |
Build and install the boost libraries:
1 |
./bjam install toolset=gcc-arm --prefix=~/edev/beagleboard/libs --disable-long-double -sNO_ZLIB=1 -sNO_BZIP2=1 |
This was tested in Ubuntu 11.04 (natty) and 10.04 LTS with linaro g++ toolchain. Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his […]