Hi,

Thanks for your detailed instruction and I installed boost lib successfully and my code using the lib can return correct results.

Thanks a lot!

Best Regards
Pan
On 02/16/2013 10:14 AM, Giovanni wrote:
Greetings Pan,
  I am using Ubuntu 12.04 with one of my machines.

  I used the Ubuntu Software Center to install the Boost C++
Libraries, which makes things so much easier. You can enter "Boost"
into the search box on the top-right corner, and find the Boost C++
Libraries to install. There are a number of them, including versions
that conflict with each other. I chose the default version, and
packages that don't conflict with that. I suggest that you install
Boost C++ that way.

  After you have installed Boost C++ with Ubuntu Software Center, you
should/"should" (it depends on how you set things up and if you have
root access) see the following.

The collection of header files for the Boost C++ Libraries in the
location: /usr/lib.
The collection of dynamic libraries (to be dynamically linked) for the
Boost C++ Libraries in the location: /usr/include/boost.

  To test if you have installed the Boost C++ Libraries correctly, run
a very simple C++ program that includes one of the Boost C++ Libraries
and calls a function from that library. For example, you can try my
attached toy program.

  To compile and run the program, try:
g++ -o static2.out get_sys_info.cpp -lboost_filesystem -lboost_system
./static2.out

  As for your specific problem, I am guessing that it is a linking
error that I also had. You need to include the Boost C++ Libraries at
the end of the compilation command (for GCC/g++). Hence, I placed the
filename (C++ source file) before including the libraries.

  I suggest that you post your compilation/linking commands, or
makefile or script for build automation, so that people can help you.
In addition, I would include the relevant source code (make it a
simple C++ program, like my example) to test your Boost C++
installation. Furthermore, I would include the transcript from the
Terminal. Just copy and paste what appears on the Terminal as you
compile the program.

  Good luck, and have a great weekend!

Regards

On Fri, Feb 15, 2013 at 8:47 AM, pan yi <outlook_eye@yahoo.com.cn> wrote:
Hi all,

I'm a beginner to use boost library for my c++ coding project. After I
include the <boost/algorithm/string.hpp> in my cpp file and compile the
code, the compiling error indicates that:
   fatal error: boost/algorithm/string.hpp: No such file or directory
I search on internet and knows that I need to install some boost library.
But which library should I install? (I tried to install the whole library
with  "sudo apt-get install libboost*", but it doesn't work.)

Can any one help me? I'm compiling and executing c++ on ubuntu Version12.04
environment

Thank you so much.

Best Regards
Pan


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users