johnjohn
johnjohn

Reputation: 4281

How do I make Boost multithreading?

I am trying to compile the latest Boost c++ libraries for Centos. I 've used bjam install and it has placed the libraries in /usr/lib and /usr/lib64.

The problem is I need the -mt variants for a specific application to run. I cannot understand in the documentation how to create the multithreading variants. :(

Please give me a hint!

Thanks!

Upvotes: 3

Views: 5692

Answers (2)

Inverse
Inverse

Reputation: 4476

You can build all variations of the boost binary libraries using the --build-type=complete option. For example:

bjam --build-type=complete stage

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

Upvotes: 3

Anycorn
Anycorn

Reputation: 51435

-mt is just distribution specific extension. either edit your config file or create 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

Upvotes: 4

Related Questions