Visual Studio .NET 2003 - 忽略libcmt和libcmtd的特定库 [英] Visual Studio .NET 2003 - Ignore Specific Library for libcmt vs libcmtd

查看:188
本文介绍了Visual Studio .NET 2003 - 忽略libcmt和libcmtd的特定库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模板VS .NET 2003项目,同事在开发他们的软件时复制和自定义。



IgnoreSpecificLibrary属性对于发布版本和调试版本都有libcmt.lib(即,对于release和debug,build都应该忽略链接器中的libcmt.lib)。



基于这已经被建立,与发布构建拉动libcmtd.lib(通过查看项目的.map文件显而易见)似乎已经导致一些运行时问题(即一个对话窗口被闪烁,如果一个断点已经设置)。



设置IgnoreSpecificLibrary以排除libcmt.lib会自动使项目链接到libcmtd.lib?



奇怪的是,构建模板(使用不正确的设置)链接到libcmt.lib,而一些定制项目(尽管不是全部)链接到libcmtd.lib



任何想法?

解决方案

/ p>

编译后,链接器将获取您的对象文件,并创建其他
a符号表,该表具有尚未完全填充的symol请求。
然后链接器通过你的库列表尝试解析那些
未完成符号。因为你忽略libcmt.lib,你的第三方库
已经离开或添加了一些未解析的符号,它包含一个链接器请求
来解析那些从licmtd.lib(也可能是其他libs),因为它
是用debug选项编译的。



如果你没有忽略libcmt.lib这些符号很可能被解决
libcmt.lib并且没有必要从libcmtd.lib中提取内容(即使
它将被解析为仍然未完成填充的其他符号)



你可能试图igmore libcmtd.lib也。如果你现在得到unresolvd外部然后
它是探测没有好主意忽略libcmt.dll。


I have a template VS .NET 2003 project, which colleagues copy and customise when developing their software.

It appears the template was altered a while back to set the IgnoreSpecificLibrary property to have libcmt.lib for both release and debug builds (i.e. for both release and debug, the build should ignore libcmt.lib in the linker).

Some projects based on this have since been built, with the release build pulling in libcmtd.lib (evident by looking through the project .map file) which appears to have caused some runtime issues (i.e. a dialog window being flashed up as though a breakpoint had been set).

Does setting IgnoreSpecificLibrary to exclude libcmt.lib automatically make the project link against libcmtd.lib?

What is weird is that building the template (with the incorrect setting) links against libcmt.lib whereas some of the customised projects (though not all) link against libcmtd.lib.

Any ideas?

解决方案

This is what happened:

After compiling the linker takes your object-files and create among others a symbol table ,which has symol-request that have not been fullfilled. Then the linker goes through your list of libraries trying resolve those unfullfilled symbols. Since you ignore libcmt.lib ,your third-party library has left or added some unresolved symbols and it contains a linker request to resolve those from licmtd.lib (and maybe other libs as well) ,since it was compilled with debug option.

If you hadn't ignored libcmt.lib those symbols would most likely be resolved by libcmt.lib and there was no need to pull in stuff from libcmtd.lib (even though it would be looked at to resolve other symbols that were still unfullfilled)

You may try to igmore libcmtd.lib also. If you now get unresolvd externals then it was probebly no a good idea to ignore libcmt.dll.

这篇关于Visual Studio .NET 2003 - 忽略libcmt和libcmtd的特定库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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