当前位置:编程学习 > C/C++ >>

C++的问题

win32控制台程序里不能用CObject类吗?我知道CObject是MFC类库中的类,我后来添加了头文件#include <afxwin.h>,还是会出错 1 fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
答案:右键你的工程, 属性
在General的Use of MFC选项选择

Use MFC in a Static Library
或是
Use MFC in a Shared DLL
OK确定 

最后选择性添加头文件
其他:你重新建一个工程 console application -> using MFC 选项, 要不然你这么加肯定是不行的 win32控制台程序里能用部分MFC类,只是这些类要不含有GUI的才能用! 

上一个:求C程序设计软件
下一个:keil编译的C程序,不知道是啥错误,求帮忙。单片机STC89C52

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,