读书人

.net控制台下 使用MFC 的有关问题 多谢

发布时间: 2012-01-19 20:57:58 作者: rapoo

.net控制台下 使用MFC 的问题 谢谢
控制台程序 就下面这些代码 没做其它任何设置

#include "stdafx.h "
#include "test.h "


int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

test.h 中:

#include "afx.h "

class MyFile{
public :
CFileFind finder;
};
运行时报错
#error Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

请问如何解决 是何原因 ? 谢谢


[解决办法]
要在选项中设置DLL文件的共享.
[解决办法]
项目-> 文件属性.......对话框:
点,配置属性-> 常规,,,,,选择:项目默认值-> MFC的使用,里的共享DLL.....
应该可以解决,
试下.

读书人网 >VC

热点推荐