Boost logo

Boost Users :

Subject: [Boost-users] Boost installation inquiry
From: mega deth (dogblush_at_[hidden])
Date: 2012-10-28 21:18:41


Hello Boost User Community, I am a big fan of boost C++ having used it for a college class to do threading. I want to get back into it and I previously installed boost on a windows machine, now dealing with a Linux machine would like some help as I have run into difficulties with the installation process. First off,  I would like to build threads and regex libraries. I have gotten the first example show below to work correctly: #include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda; typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); } My main issue is the next part. I have Boost is located in /usr/local/boost_1_51_0 I have run the following steps: 1. Go to the directory tools/build/v2/. 2. Run bootstrap.sh 3. Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed 4. Add PREFIX/bin to your PATH environment variable. For the 3rd step,  I ran b2 as follows: b2 --build-dir=~/bin/Boos tC++1.51/ toolset=gcc stage My PATH looks like this: > echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/root/bin :/root/bin/BoostC++1.51/bin/ g++ I- /root/boost/ /root/bin/repos/c-projects/c++/C++Projects/Boost/testLinkToBoostLib.cpp -o example \ > ~/boost/stage/lib/libboost_ libboost_chrono.a                   libboost_regex.a libboost_chrono.so                  libboost_regex.so libboost_chrono.so.1.51.0           libboost_regex.so.1.51.0 libboost_filesystem.a               libboost_system.a libboost_filesystem.so              libboost_system.so libboost_filesystem.so.1.51.0       libboost_system.so.1.51.0 libboost_program_options.a          libboost_thread.a libboost_program_options.so         libboost_thread.so libboost_program_options.so.1.51.0  libboost_thread.so.1.51.0 Finally this is my issue: When I try to compile the test regex code with boost, I am unable to find the correct library to include. I fear that because I have this issue, that my thread library is not built as well. Is there a way to check? Can you provide what worked for you to install boost on your linux machine.   c++ -I path/to/boost_1_51_0 example.cpp -o example \ ~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a I am unable to find or even create this: libboost_regex-gcc34-mt-d-1_36.a If you have any advise or direction please let me know. Thank you! There was some talk about checking the configuration of the user-config.jam if there are linker or compile issues. But I do not think those  could be the issues at the moment. Thank you in advance for looking at my issue! ~Jake



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net