在 Visual Studio 中静态链接库 [英] Statically linking libs in Visual Studio

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

问题描述

当您在 Visual Studio 中选择 /MTd 静态链接时,它会尝试静态链接到每个库还是系统库有一些例外?

When you choose /MTd static linking in Visual Studio, would it try to link to each lib statically or there are some exceptions to system libs?

推荐答案

/MT 和/MD 标志仅定义 C/C++ 运行时库的链接方式.它对其他库、系统或用户定义没有影响.

The /MT and /MD flags only define how the C/C++ runtime library is linked in. It has no effect on other libraries, system or user defined.

系统库,如 kernel32.lib、user32.lib 等)是导入库 - 没有可链接的静态库.

The system libraries, such as kernel32.lib, user32.lib, etc) are import libraries - there is no static library to link with.

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

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