Installing C++ Boost on Slackware/Zenwalk
C++ Boost 1.33.1 on Slackware/Zenwalk:
- Download bjam slackware package(tgz) and boost-1_33_1 source package(tar.gz) from the sourceforge.net website:
bjam for slackware
c++ boost source package
(or Google for the latest versions of these two packages) - Save these two files in the home directory and then cd into it:
sh# cd $HOME
- Install bjam(as root):
sh# installpkg boost-jam-3.1.11-1-linuxx86.tgz
sh# export PATH=$PATH:/boost-jam-3.1.11-1-linuxx86/ - Compile and install boost(as root):
sh# tar xjvf boost_1_33_1.tar.bz2
sh# cd boost_1_33_1
sh# bjam “-sTOOLS=gcc” install
C++ Boost is now installed. This procedure doesn’t install the files in the default library paths, so compilation commands are slightly longer than they are for Gentoo and Debian/Ubuntu:
sh# g++ -o first first.cpp -I/usr/local/include/boost-1_33_1
sh# g++ -o second second.cpp -I/usr/local/include/boost-1_33_1 -L/usr/local/lib -lboost_filesystem-gcc
You can simplify this by adding the paths of boost folders to gcc library environment variables:
sh# export LIBRARY_PATH=/usr/local/lib
The compilation can now be performed using the following simple commands:
sh# g++ -o second second.cpp -lboost_filesystem-gcc
The two ‘export’ commands can be added at the end of the profile file(/etc/profile or $HOME/.bash_profile) to avoid having to type them every time a new shell is opened. Other way to simplify the process would be to create symbolic links to boost library paths in the Slackware standard include paths so that gcc can find them directly.
Related Posts:
Readers who viewed this page, also viewed:
- Installing C++ Boost on Gentoo and Debian/Ubuntu
- Update or Install Applications on Debian/Ubuntu Without an Internet Connection
- How to Test C++ Boost Installation
- Installing C++ Boost 1.34.1 on Slackware/Zenwalk
- Installing C++ Boost on SuSE and Fedora
[...] Related Posts: Installing C++ Boost on: Slackware/Zenwalk Fedora/SuSE Setting the Stage for C++ Boost How to Test C++ Boost Installation Boost Filesystem Library(Part I): Writing Portable C++ Programs to Acess The Filesystem C++ Boost Filesystem Library(Part II): Example Programs [Digg this] [del.icio.us] [...]
QuotePingback by Every Flavour Beans » Installing C++ Boost on Gentoo and Debian/Ubuntu — May 28, 2006 @ 9:56 pm
Good howto however there’s 1 that didn’t work for v. 1_34_1.
sh# bjam “-sTOOLS=gcc” install
should be
sh# bjam –toolset=gcc install
bjam tried to guess gcc correctly however.
QuoteComment by kerrigangster — August 25, 2007 @ 8:04 am
The doc pages are interspersed with the source code. Would you mind packaging the doc for slackware users?
QuoteComment by kerrigangster — August 25, 2007 @ 8:08 am
Hi Kerrigangster,
Yes, the build procedure of Boost 1.34.1 suggests
as the command-line option to specify the toolchain(as this version uses Boost.Build V2). I will update the Boost installation articles to note that.
I have no idea how to package software or documentation for any of the GNU/Linux distributions. Is there any document outlining how to package documentation for Slackware?
QuoteComment by tabrez — August 26, 2007 @ 1:20 pm
The SlackBuild for 1.33.1 by Mr. Eric Hameleers at http://www.slackware.com/~alien/slackbuilds/boost/build/boost.SlackBuild can be a good starting point. I am looking into it myself. Apparently, there are file organization changes in 1.34.1 like the jam sources for instance.
QuoteComment by kerrigangster — August 27, 2007 @ 8:00 am
SlackBuild scripts seem to be a nice way to install applications on Slackware, had never heard of them before. Thanks for pointing it out, I will look into them.
QuoteComment by tabrez — August 27, 2007 @ 11:46 am
[...] *Thanks to kerrigangster for reminding me about the new syntax to build C++ Boost libraries using bjam build tool. [...]
QuotePingback by Installing C++ Boost 1.34.1 on Slackware/Zenwalk — September 17, 2007 @ 8:44 pm
hello and nice post, it’s very useful!
btw i have a question for you: if a grab de src (1.34.1) and simply start compilation with ‘configure’, it will produce (after years of compilation) the libraries specified to me (–with-libraries=regex,serialization,thread and so on) but will add a number version on each librarie produced.
i need to remove the number version from the produced libraries (ex libboost_thread-gcc41-mt-1_34_1.so to libboost_thread-gcc41-mt.so)and don’t know how to do it. ani idea?
QuoteComment by Sombriks — January 7, 2008 @ 9:27 am
man, ignore my last post, the problem is jsut the toolset (getting gcc41 instead just gcc)
QuoteComment by Sombriks — January 7, 2008 @ 9:53 am