[VC++]手工编译MFC单文档框架

1.新建VC++【空项目】命名为AppDraw,

2.导入现有的代码,和res文件夹和其中的文件

3.修改项目属性和依赖项

(1)右键菜单->选择项目->属性->配置属性->链接器->子系统,改为Windows (/SUBSYSTEM:WINDOWS)

(2)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]

解决方法:工程(Project)->属性(Properties)->配置属性(Configuration Properties)->常规->“使用MFC作为共享的DLL”

(3)IntelliSense: #error 指令: Please use the /MD switch for _AFXDLL builds

解决方法:工程(Project)->属性(Properties)->配置属性(Configuration Properties)->c/c++->代码生成(Code Generation)->运行时库(Use run-time library)->多线程调试DLL(/MDd)(Multithreaded DLL/Debug Multithreaded DLL)

(4)主要如果有编译过程中需要额外的静态链接库.lib,需要配置如下信息。

配置属性(Configuration Properties)->链接器->启用增量链接,选择是。

配置属性(Configuration Properties)->链接器->附加依赖项,输入$(SolutionDir)\Debug\GeoIOD.lib。

posted @ 2012-10-22 15:33  太一吾鱼水  阅读(330)  评论(0编辑  收藏  举报