Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Boost notes --Thread - problems encountered in the initial use on Ubuntu     - Linux system package manager -RPM (Linux)

- Distributed Firewall Design on Linux platform (Linux)

- SME Linux network security policy server security (Linux)

- To restore the last time applications running when Ubuntu user log in again (Linux)

- Oracle to create an external table (Database)

- Detailed use Zabbix monitoring Nginx (Server)

- CentOS7 yum install third-party source EPEL (Linux)

- Implement firewall function on a closed Linux machine (Linux)

- Linux System Getting Started Tutorial: How to update outdated version of Ubuntu (Linux)

- C ++ thread creates transmission parameters are changed (Programming)

- UNIX how to restrict users by IP Telnet (Linux)

- Python maketrans () method (Programming)

- Advanced permissions Linux file system settings (Linux)

- OpenStack / Dev stack with neutron on Ubuntu 14.04 (Server)

- Install VLC player on Ubuntu 14.10 (Linux)

- 10 easy to use Linux utilities Recommended (Linux)

- The method of MySQL two kinds of incomplete recovery (Database)

- The maximum subsequence algorithm and optimization problems (Programming)

- Linux serial port driver test (Linux)

- Linux user login ban (Linux)

 
         
  Boost notes --Thread - problems encountered in the initial use on Ubuntu
     
  Add Date : 2018-11-21      
         
         
         
  My system is Ubuntu14.04, according to the online tutorial installed Boost.

Today is the first time using Boost library, read the official document in shocked not get to know, in the case to find a simple example, look at the code to understand how a simple thread is used. The results in this example compile time (also in accordance with the author's method) there is a problem, google one, did not find (mostly in English, looking headache, but also just start linux system, some foreigners do not speak too high up to see know how else), then Baidu, found a similar article, see other people's solutions begin to understand, but also to understand when looking at Boost official document several puzzles.

Support Boost thread library official document on several other libraries have dependencies (official description)

This is when I began to compile command: g ++ thread_01.cpp -o thread_01 -lboost_thread

Results There was a problem

Cause this problem because, said earlier in the thread library dependencies several other libraries, so cause problems when you compile and link, we can see that is missing is lboost_system.so.1.60.0 system libraries. So to solve this problem you need to add the library at compile time.

This is correct compile command: g ++ thread_01.cpp -o thread_01 -lboost_thread -lboost_system
     
         
         
         
  More:      
 
- Linux process group, session daemon (Linux)
- MongoDB slice simple example (Database)
- Android Sets the system screen brightness (Programming)
- Java multi-threaded communications pipeline flow (Programming)
- The difference between vi and nano (Linux)
- How to install with JSON support in Ubuntu 15.04 SQLite 3.9.1 (Database)
- Source encountered problems and solutions when installing SaltStack (Server)
- Let Linux operating system more secure (Linux)
- Mac OS X Server installation and application (Linux)
- CentOS source installation GitLab Chinese Version (Server)
- Acquaintance C ++: the most simple C ++ program (Programming)
- High-performance JavaScript loops and flow control (Programming)
- The PostgreSQL database pg_dump command line does not enter a password method (Database)
- Python format string (Programming)
- CentOS install Redis (Database)
- Do not find ifconfig eth0 and IP address under CentOS6.5 (Linux)
- Shell for loop (Programming)
- Difference LVS three scheduling modes (Server)
- Configuring Allatori code confusion when developing general Java applications in NetBeans (Programming)
- Server Security Analysis attack on Linux (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.