Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 错误解决
2011-11-04 16:43
417 查看
环境:VS2010
任务:编写一个显示当前系统时间、设置系统时间的类
代码:
问题:点运行时出现如下错误:
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]
解决:右击项目-->属性-->配置属性-->常规,然后在右边的“项目默认值”中的“MFC的使用”选项中选择“在共享 DLL 中使用 MFC”,再次点击运行,无问题,正解。
任务:编写一个显示当前系统时间、设置系统时间的类
代码:
#include "CTime.h" #include <iostream> #include <afxdisp.h> using namespace std; int main(void){ MyCTime myCtime; //调用显示系统当前时间的函数 myCtime.GetSysCurTime(); COleDateTime time; time = COleDateTime::GetCurrentTime(); int hour = time.GetHour(); int minute = time.GetMinute(); int second = time.GetSecond(); //调用推进当前时间的函数 myCtime.adv(hour,minute,second); getchar(); //调用重新设置当前时间的函数 myCtime.reset(hour,minute,second); system("pause"); return 0; }
问题:点运行时出现如下错误:
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]
解决:右击项目-->属性-->配置属性-->常规,然后在右边的“项目默认值”中的“MFC的使用”选项中选择“在共享 DLL 中使用 MFC”,再次点击运行,无问题,正解。
相关文章推荐
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 错误解决
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 错误解决
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 错误解决
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version 问题解决
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Ple
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Plea
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version.
- Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #defi
- (转)Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~
- VS——》Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version.
- Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version~~~~ .