静态库和静态链接的MSVC ++运行时 [英] Static Libraries and the statically-linked MSVC++ runtime

查看:508
本文介绍了静态库和静态链接的MSVC ++运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了构建一个静态库,是在编译时(库的)或在最后的EXE编译时静态链接的静态C运行时根据Hans的说法,CRT(C Runtime)在使用MSVC编译静态LIB时没有链接。它在最后的EXE编译时被链接。



然而,即使这是真的。您仍然无法将C运行时混合在静态库中。他们都必须使用相同的确切运行时(或系统运行时MSVCRT.dll)


For building a static library, is the static C runtime statically linked at compile time (of the library) or at final EXE compile time?

解决方案

According to Hans, the CRT (C Runtime) is not linked while compiling a static LIB using MSVC. It is linked at final EXE compile time.

However, even though this is true. You still cannot mix C runtimes in static libraries. They all must use the same exact runtime (or the system runtime MSVCRT.dll)

这篇关于静态库和静态链接的MSVC ++运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆