【问题标题】:Static Libraries and the statically-linked MSVC++ runtime静态库和静态链接的 MSVC++ 运行时
【发布时间】:2012-03-06 05:31:05
【问题描述】:

对于构建static library静态 C 运行时是在(库的)编译时还是在最终的 EXE 编译时静态链接的?

【问题讨论】:

  • 编译时没有链接。在您链接最终的 .exe 或 .dll 之前,不会链接 CRT

标签: dll runtime static-libraries static-linking msvcrt


【解决方案1】:

根据 Hans 的说法,使用 MSVC 编译静态 LIB 时未链接 CRT(C 运行时)。它在最终的 EXE 编译时链接。

然而,即使这是真的。您仍然不能在静态库中混合 C 运行时。它们都必须使用完全相同的运行时(或系统运行时 MSVCRT.dll)

【讨论】:

    猜你喜欢
    • 2020-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多