AfxInitManaged链接错误 [英] AfxInitManaged link error

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

问题描述

我正在将一个大型项目从VC6升级到VS2010.进行得很好,除了使用预编译头构建发行版时无法解决.如果不使用预编译头,它将花费很多时间,但是可以正确链接.环顾四周 对于可能导致问题的#pragmas,但未找到任何内容. VC2005提到的eafxis.lib不存在.如果我从afx头文件中删除了此调用的使用,它仍然无法获取,因为预构建的库mfcs100.lib引用了它.

I am upgrading from VC6 to VS2010 a large project. It has gone well except this is unresolved when building the Release version with Precompiled Headers. If not using Precompiled Headers it takes forever to build but does link correctly. Have looked around for #pragmas which could be causing the issue but nothing is found. The eafxis.lib mentioned for VC2005 does not exist. If I remove the use of this call from the afx header file it still doesn't get it because the prebuilt library mfcs100.lib references it.

是否需要包含一个库来获取其实例?还是我还需要什么?在本地尝试自己的版本无法正常工作...在这里尝试过各种方法...

Is there a library which needs to be included to grab the instance of this? Or what else do I need? Trying my own version of this locally doesn't work as well... Have tried all sorts of things here...

以下是链接错误行:

1> mfcs100.lib(nolib.obj):错误LNK2001:无法解析的外部符号"int __cdecl _AfxInitManaged(void)"; (?_AfxInitManaged @@ YAHXZ)

1>mfcs100.lib(nolib.obj) : error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" (?_AfxInitManaged@@YAHXZ)

1> mfcs100.lib(stdafx.obj):错误LNK2001:无法解析的外部符号"int __cdecl _AfxInitManaged(void)"; (?_AfxInitManaged @@ YAHXZ)

1>mfcs100.lib(stdafx.obj) : error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" (?_AfxInitManaged@@YAHXZ)

1> mfcs100.lib(sockexp.obj):错误LNK2001:无法解析的外部符号"int __cdecl _AfxInitManaged(void)"; (?_AfxInitManaged @@ YAHXZ)

1>mfcs100.lib(sockexp.obj) : error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" (?_AfxInitManaged@@YAHXZ)

1> mfcs100.lib(appmodul.obj):错误LNK2001:未解析的外部符号"int __cdecl _AfxInitManaged(void)"; (?_AfxInitManaged @@ YAHXZ )

1>mfcs100.lib(appmodul.obj) : error LNK2001: unresolved external symbol "int __cdecl _AfxInitManaged(void)" (?_AfxInitManaged@@YAHXZ)

推荐答案

所以对此没有帮助吗?这是一个老"的字眼.问题显然是因为经过讨论,信息所在的网站已经消失了.预编译头文件works/not_works必须是一个大提示....

So no help with this? This is an "old" problem apparently because it was discussed and the website where the info lived already went away. The Precompiled Headers works/not_works has to be a big clue....

昨晚我在所有Microsoft库中都使用了DumpBin,试图找到这种用法或入口点-无法做到.

I was using DumpBin with all the microsoft libraries last night to try and find this usage or entry point - could not do it.

尽管最好的方法是使用最新的工具,即使我从事C ++编程已经很多年了(80年代后期),也正因为这些奇怪的情况,开发人员似乎不得不选择新的更复杂的东西无法控制.... 想要正确使用编译器和链接器,而不是花哨的东西!核心应该工作并且牢固,恕我直言...

Although it would be nice to use the latest tools, even though I've been programming C++ for many years (late 80s) cringe going to the new more complex stuff just because of these weird situations the developer seems to have no control over.... Just want to use the Compiler and Linker correctly, not bells and whistles! The core should work and be solid, IMHO...

感谢任何提示或指示,我将尝试很多方法,如果能够获得一些指示可能来自何方的指示....但是它在Microsoft领域的某个地方,似乎已经落幕了……

Thanks for any hints or directions, I will try lots of stuff if can get some direction of where this could come from.... but it's somewhere in Microsoft land it seems behind the curtain...

-吉姆

 


这篇关于AfxInitManaged链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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