What is boost_thread-mt?

Ryan Schmidt ryandesign at macports.org
Fri Jul 26 19:55:08 PDT 2013


On Jul 26, 2013, at 21:44, Peng Yu wrote:

> I see the following files. I'm wondering why '-mt' is appended to the
> file.

It stands for "multi-threaded".

> I don't see such thing on ubuntu.

Then I guess Ubuntu only offers the single-threaded versions of boost.

Boost can be installed in both single- and multi-threaded versions simultaneously, but they must be built separately; the boost port defaults to no_single to cut the build time in half.

> I want to make the compilation
> of some source code using libboost_thread compatible on both Mac and
> Ubuntu. Does anybody know how to do it? Thanks.

If their source assume that the single-threaded versions of boost exist, but would also work with the multi-threaded versions, then you could edit the source to add the "-mt" suffix.

Or you could install the boost port without the default +no_single variant. However that's not ideal because that would require everyone wanting to use your port to rebuild boost that way.

A better solution for the boost port would be for single- and multi-threaded versions to be in separate simultaneously-installable subports.




More information about the macports-users mailing list