更新时间:2022-06-24 21:42:11
Both MT
和 / MD
是链接器选项。如果您正在建立多个模块,则可以有多个选项。
Both /MT
and /MD
are linker options. If you're building multiple modules, you can have multiple options.
在这种情况下,使用 / MD
Qt和你自己的代码。将驱动程序包含在其自己的DLL中,使用非CRT依赖的API,并将该DLL与 / MT
链接。使用COM可能是一个选项。这当然不是CRT依赖,但它可能是杀手。
In this case, use /MD
for Qt and your own code. Wrap the driver in its own DLL, with a non-CRT-dependent API, and link that DLL with /MT
. Using COM might be an option. That's certainly not CRT dependent, but it may be overkill.