1. Download boost 1.46.1 from the boost official website.
2. Run Apt-Get install build-essential (The purpose is to install some tools such as GCC and G ++ for compilation)
Note: I perform operations under the root user. Sudo apt-Get install build-essential
./Is the prefix of the UNIX-like system execution file, which is used to execute the bjam file.
- -A is a parameter, which indicates rebuild ). Enter./bjam-H for more help.
- -Shave_icu = 1, which indicates Unicode/ICU is supported. Click Here (http://goo.gl/ySEe) premise: the system needs to install libicu-Dev, you can enter in the terminal: sudo apt-Get install libicu-Dev
- Install, indicating Installation
- -- Clean indicates cleaning. If the current statement contains-A, you do not need to clear it manually. Otherwise, you need to run./bjam -- clean first.
If you execute the previous step, there will be problems such as: MPI, most of which is that MPI is not installed on the local machine. Depending on the system prompts, you can find/home/volnet/sourcecode/boost_1_42_0/tools/build/v2/user-config.jam. Keep up with the file
Using MPI;You can. If the MPI problem persists, it indicates that MPI is not installed on the local machine.
Sudo apt-Get install MPI-default-Dev
- This should be compiled smoothly. The boost library is available in/usr/local/lib.
The following describes how to link static link libraries in eclipse.
The unix variants wizard provides a regular expressionProgram.
In eclipse, C ++ project is added and the Linux C ++ compiler is used. SetCodeCopy to file:
As you need to statically link to the Regular Expression Library, set the corresponding *. A file path to eclipse, as shown in, so that the linker can find it.
Compiled!
In order for our programs to load correctly, we need to allow our programs to find our libraries within our system. At this time, we need to set it. For more information, see this section.
Test program!
Www.linuxidc.com @ Ubuntu :~ /Workspace/boost_get_started/debug $./boost_get_started <Test
Will success spoil Rock Hunter?
Here, test is a file.
Reference: http://blog.csdn.net/dainiao01/article/details/6340472
2. Run Apt-Get install build-essential (The purpose is to install some tools such as GCC and G ++ for compilation)
Note: I perform operations under the root user. Sudo apt-Get install build-essential
./Is the prefix of the UNIX-like system execution file, which is used to execute the bjam file.
- -A is a parameter, which indicates rebuild ). Enter./bjam-H for more help.
- -Shave_icu = 1, which indicates Unicode/ICU is supported. Click Here (http://goo.gl/ySEe) premise: the system needs to install libicu-Dev, you can enter in the terminal: sudo apt-Get install libicu-Dev
- Install, indicating Installation
- -- Clean indicates cleaning. If the current statement contains-A, you do not need to clear it manually. Otherwise, you need to run./bjam -- clean first.
If you execute the previous step, there will be problems such as: MPI, most of which is that MPI is not installed on the local machine. Depending on the system prompts, you can find/home/volnet/sourcecode/boost_1_42_0/tools/build/v2/user-config.jam. Keep up with the file
Using MPI;You can. If the MPI problem persists, it indicates that MPI is not installed on the local machine.
Sudo apt-Get install MPI-default-Dev
- This should be compiled smoothly. The boost library is available in/usr/local/lib.
The following describes how to link static link libraries in eclipse.
In the unix variants wizard, a program using regular expressions is officially provided.
In eclipse, C ++ project is added and the Linux C ++ compiler is used. Copy the code to the file:
As you need to statically link to the Regular Expression Library, set the corresponding *. A file path to eclipse, as shown in, so that the linker can find it.
Compiled!
In order for our programs to load correctly, we need to allow our programs to find our libraries within our system. At this time, we need to set it. For more information, see this section.
Test program!
Www.linuxidc.com @ Ubuntu :~ /Workspace/boost_get_started/debug $./boost_get_started <Test
Will success spoil Rock Hunter?
Here, test is a file.
Reference: http://blog.csdn.net/dainiao01/article/details/6340472