从VS2008升级到VS2010后未解决的外部问题 [英] Unresolved externals after upgrading from VS2008 to VS2010
问题描述
升级到VS2010后,我们的某个解决方案项目将无法链接。 我收到以下错误:
After upgrading to VS2010, one of our solution projects won't link. I get the following error:
1> msvcrtd.lib(atonexit.obj):错误LNK2019:未解析的外部符号
__imp__EncodePointer @ 4 在函数__onexit中引用
1> msvcrtd.lib(crtdll.obj):错误LNK2001:未解析的外部符号
__imp__EncodePointer @ 4
1> msvcrtd.lib(atonexit.obj):错误LNK2019:未解析的外部符号
__imp__DecodePointer @ 4 在函数__onexit中引用
1> msvcrtd.lib(crtdll.obj):错误LNK2001:未解析的外部符号
__imp__DecodePointer @ 4
1> ... file.dll:致命错误LNK1120:2个未解析的外部
1>msvcrtd.lib(atonexit.obj) : error LNK2019: unresolved external symbol
__imp__EncodePointer@4 referenced in function __onexit
1>msvcrtd.lib(crtdll.obj) : error LNK2001: unresolved external symbol
__imp__EncodePointer@4
1>msvcrtd.lib(atonexit.obj) : error LNK2019: unresolved external symbol
__imp__DecodePointer@4 referenced in function __onexit
1>msvcrtd.lib(crtdll.obj) : error LNK2001: unresolved external symbol
__imp__DecodePointer@4
1>...file.dll : fatal error LNK1120: 2 unresolved externals
如果我更改平台工具集项目属性到v90,然后项目编译和链接没有问题。 该解决方案包含10多个项目,这是唯一一个解决此问题的项目。 我们没有调用缺少的函数 - 它是
是MFC中的东西。 我们的目标是> WinXP SP2,这是根据MSDN文档引入这些功能的地方。
If I change the Platform Toolset project properties to v90, then the project compiles and links with no problem. THe solution contains 10+ projects and this is the only one that gives this problem. We're not calling the missing functions - it is something in MFC. Our target is > WinXP SP2, which is where those functions were introduced according to the MSDN documentation.
乍一看,EncodePointer / DecodePointer的装饰名称似乎存在问题。 我试图在链接器输入中包含kernel32.lib,但这没有帮助。 我没有通过搜索找到任何有用的东西。
On first glance it appears to be an issue with the decorated names for EncodePointer / DecodePointer. I've tried to include kernel32.lib in the linker inputs but this did not help. I have not found anything useful by searching.
欢迎任何建议!
谢谢,
Kokketiel
Kokketiel
推荐答案
我认为它是C运行时DLL而不是kernel32。您是否尝试将c运行时DLL强制转换为VS2008使用的相同版本?
I think it is the C runtime DLL and not kernel32. Have you tried forcing the c runtime DLL to the same version that VS2008 uses?
这篇关于从VS2008升级到VS2010后未解决的外部问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!