How to do multithreading boost?

I am trying to compile the latest Boost C ++ libraries for Centos. I used bjam install and placed the libraries in / usr / lib and / usr / lib64.

The problem is that I need the -mt options to run a specific application. I cannot understand in the documentation how to create multi-threaded options. :(

Please give me a hint!

Thank!

+3
source share
2 answers

-mt is just a distribution extension. either edit your configuration file or create a symbolic link to libboost_thread

andrey@localhost:~$ ls -l /usr/lib/libboost_thread*
-rw-r--r-- 1 root root 174308 2010-01-25 10:36 /usr/lib/libboost_thread.a
lrwxrwxrwx 1 root root     41 2009-11-04 10:10 /usr/lib/libboost_thread-gcc41-mt-1_34_1.so.1.34.1 -> libboost_thread-gcc42-mt-1_34_1.so.1.34.1
-rw-r--r-- 1 root root  49912 2008-11-01 02:55 /usr/lib/libboost_thread-gcc42-mt-1_34_1.so.1.34.1
lrwxrwxrwx 1 root root     17 2010-01-27 18:32 /usr/lib/libboost_thread-mt.a -> libboost_thread.a
lrwxrwxrwx 1 root root     25 2010-01-27 18:32 /usr/lib/libboost_thread-mt.so -> libboost_thread.so.1.40.0
lrwxrwxrwx 1 root root     25 2010-01-27 18:32 /usr/lib/libboost_thread.so -> libboost_thread.so.1.40.0
-rw-r--r-- 1 root root  89392 2010-01-25 10:36 /usr/lib/libboost_thread.so.1.40.0
+4
source

You can create all variants of boost binary libraries using the option --build-type=complete. For instance:

bjam --build-type=complete stage

This will put all the library files in <your boost dir>/stage/lib/

+3

Source: https://habr.com/ru/post/1743663/


All Articles