BOOST libraries in multithreading-aware mode(多线程感知模式下的 BOOST 库)
问题描述
可以在所谓的线程感知模式下编译 BOOST 库.如果是这样,您将看到...-mt..."出现在库名称中.我不明白它给了我什么,我什么时候需要使用这种模式?它能给我带来什么好处吗?
There is a possibility to compile BOOST libraries in the so-called thread-aware mode. If so you will see "...-mt..." appeared in the library name. I can't understand what it gives me and when do I need to use such mode? Does it give me any benefits?
不仅如此,我对在无线程感知机制(名称中没有 -mt)中编译 BOOST Threads 库感到非常困惑.这对我来说没有任何意义.看起来自相矛盾:/
More than that I'm really confused by having BOOST Threads library compiled in NO-thread-aware regime (with no -mt in the name). It does not make any sense for me. Looks self-contradictory :/
非常感谢您的帮助!
推荐答案
因为你没有说明你是如何构建的,在什么平台上,我会解释整个故事.在 Linux 和 Windows 上,Boost.Thread 库都是以 MT 模式构建的.在 Windows 上,默认情况下,您会获得 -mt 后缀.在 Linux 上,默认情况下在 1.42 中,您没有后缀.在 Linux 上没有后缀的原因是几乎没有其他库使用这种约定,无论如何它在 Linux 上都不那么重要.
Because you did not specify how you have built, and on what platform, I'll explain the whole story. Both on Linux and Windows, Boost.Thread library is built in MT mode. On Windows, by default, you get -mt suffix for it. On Linux, by default in 1.42, you get no suffix. The reason you get no suffix on Linux is that pretty much no other library uses such convention, and it's much less important on Linux anyway.
这能说明问题吗?
这篇关于多线程感知模式下的 BOOST 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:多线程感知模式下的 BOOST 库
基础教程推荐
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- CString 到 char* 2021-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
