一、cximage600_full在VS2013编译和使用
1、编译
(1)下载后解压缩,直接打开根目录下的 CxImgLib.dsw文件。版本转换完成之后,在编译之前先将每个工程属性的字符集由原先的使用Unicode字符集改为使用多字节字符集,生成解决方案。
注:编译报错及解决方法
1)字符问题解决方法:编译之前先将每个工程属性的字符集由原先的使用Unicode字符集改为使用多字节字符集。
2)编译报错:Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library。
解决方法:下载 Multibyte MFC Library for Visual Studio 2013并安装 http://www.microsoft.com/zh-cn/download/details.aspx?id=40770
3)编译报错:错误 6 error LNK1104: 无法打开文件“.\Debug\png.lib”。
解决方法:在编译cximagemfcdll之前,先修改其属性,链接器->输入->附加依赖项,将$(OutDir)png.lib等改为../../Debug/png.lib(../../Release/png.lib)。
4)编译报错:MFC does not support WINVER less than 0x0501. Please change the definition of WINVER in your project properties or precompiled header.
解决方法:cximage600_full\CxImage\CxImageDLL 和 cximage600_full\demo路径下的两个StdAfx.h 中的#define WINVER 0x0400改成#define WINVER 0x0501。
2、准备工作
CxImage的使用方式是动态库的,所以需要三种东西 include、lib、dll。
(1)include :cximage600_full\CxImage 路径下的头文件。
(2)lib:cximage600_full\CxImage\CxImageDLL 路径下,根据编译时选择的“