如何将MFC包含为静态lib和afxdisp.h [英] How to include MFC as static lib and afxdisp.h

查看:241
本文介绍了如何将MFC包含为静态lib和afxdisp.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图将ross white的AXlib用作我的项目的一部分,该项目被编译为静态lib.

我无法编译文件.我在 Axlib.h 文件中的ASSERTColeCurrency有问题.我有
尝试在属性中在静态库中使用MFC",但是它不起作用.

我还手动添加了 afxdisp.h ,但是我遇到了多个声明的问题.

Hi,

I am trying to use AXlib of ross white as part of one of my project that is compiled as a static lib.

I cannot compile the files. I have a problem with ASSERT and ColeCurrency in the Axlib.h file. I have
tried to "Use MFC in a Static Library" in the properties but it does not work.

I also include afxdisp.h by hand but then I have a problem of multiple declarations.

error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)


欢迎您的帮助.
谢谢,
kamel


I welcome your help.
thanks,
kamel

推荐答案

尝试在本文结尾处在论坛中发布您的问题,然后作者可能会看到您的消息.
Try posting your question in the forum at the end of the article, then maybe the author will see your message.


此链接上有一些信息- http://support.microsoft.com/kb/148652 [ ^ ]

您也可以尝试在Project Properties -> Configuration Properties -> Linker -> Command Line -> Additional Options中提供/FORCE:MULTIPLE.
This link has some information on it - http://support.microsoft.com/kb/148652[^]

You could also try giving /FORCE:MULTIPLE in Project Properties -> Configuration Properties -> Linker -> Command Line -> Additional Options.


这篇关于如何将MFC包含为静态lib和afxdisp.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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