1,mfc dll的问题
1)stdAfx头文件问题(创建的是Regular statically linked to MFC DLL,即VC mfc dll选项的第一项)
单独编译的时候没出问题,生成dll的时候也没出现这个问题,但是调用的时候出下面问题
fatal error C1189: #error : include 'stdafx.h' before including this file for PCH
所以将dll文件中的stdafx.h文件内容清空改为以下内容
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#include <afxcmn.h>
参考 http://bbs.csdn.net/topics/391079543
以及 http://blog.csdn.net/jiaquan_liu/article/details/8758682 这个问题相同,但是解决方法不同,而且自己用时是有错误的,因为找不到targetver.h这个头文件
2)调用dll时出现dll文件的头文件引用的source.h找不到
source.h是由dll模板生成时定义并引用的,不知道有啥用,给注释了,dll编译生成通过,并且调用也不出现问题
2. win32 application 和 win32 console appliaction 差别
简单编程用后者
http://blog.csdn.net/yam_killer/article/details/7665408