在写那个CSDN博文提取的时候因为要显示用户的头像在对话框上面,自然想到的就是使用大名鼎鼎的GDI+了,但是在我准备使用gdi库,加入头文件,引入lib之后,引发的错误吓了我一跳!32个错误。后面根据有人的博文看到要在stdafx里面写成如下,错误减少到16个

#ifndef ULONG_PTR
#define ULONG_PTR unsigned long*
#include "GdiPlus.h"
using namespace Gdiplus;
#endif
#pragma comment(lib,"gdiplus.lib")

16个错误:简直不敢相信,因为我在另外一个vc6.0的工程里面使用的是同样的代码(仅仅是包含头文件和引入库)却没有一点错误,

苦苦的百度+Google关键字“GDI+   error C2061: syntax error : identifier 'Count'  ”还是没有找到答案,在一些技术群里面讨论了很久,有的说vc6.0太老了

我有点不相信,因为我有个从别人那里拷贝来的工程已经通过编译链接了,只好继续尝试各种方法

后来一想,因为要使用gdi+库的话,总是要设置一下IDE路径,我看了一下我的路径设置,如下,

好吧,有人说VC6.0太老了也许对太新的SDK里面GDI+支持不好,所以我就重新下载了一个GDIPlus.zip解压在

D:\Program Files\Microsoft Visual Studio\VC98\GDIPlus

修改路径设置如下,将我们自己的GDI放在上面,而不是替换SDK的路径

后来转念一想,为什么有个工程又可以在不修改路径的情况通过编译链接呢,

我的猜想是,因为开始的时候那个工程已经在别人机子上编译好了,再在我机子上编译的话,gdi+那部分就不会再引入我机子上的gdi+里面的(联系pch的作用,将外部框架的头文件编译好了)

便于他人检索,贴出错误提示,有什么不对的地方,欢迎留言指正

vc6.0支持的gdi+下载地址http://download.csdn.net/detail/lilien1010/4449349

d:\program files\microsoft sdks\windows\v6.0a\include\gdiplustypes.h(744) : error C2061: syntax error : identifier 'Count'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplustypes.h(744) : error C2146: syntax error : missing ';' before identifier 'BYTE'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusheaders.h(196) : error C2061: syntax error : identifier '__out_ecount'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusflat.h(2347) : error C2061: syntax error : identifier '__out_bcount'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusflat.h(2355) : error C2061: syntax error : identifier '__out_bcount'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusflat.h(2388) : error C2061: syntax error : identifier '__out_ecount'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(123) : error C2065: '__out_ecount' : undeclared identifier
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(123) : error C2146: syntax error : missing ')' before identifier 'LPWSTR'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(123) : error C2433: 'GetFamilyName' : 'inline' not permitted on data declarations
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(123) : error C2350: 'FontFamily::GetFamilyName' is not a static member
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(123) : error C2440: 'initializing' : cannot convert from 'int' to 'enum Gdiplus::Status'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(125) : error C2059: syntax error : ')'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(126) : error C2143: syntax error : missing ';' before '{'
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusfontfamily.h(126) : error C2447: missing function header (old-style formal list?)
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusimagecodec.h(37) : error C2660: 'GdipGetImageDecoders' : function does not take 3 parameters
d:\program files\microsoft sdks\windows\v6.0a\include\gdiplusimagecodec.h(56) : error C2660: 'GdipGetImageEncoders' : function does not take 3 parameters

VC6.0MFC下使用GDI++编译链接通不过的解决方案之一(syntax error : identifier 'Count')相关推荐

  1. 编译时遇到如下错误error C2061: syntax error : identifier 'THIS_FILE'

    上午写程序时,加入了前些写的一个类,编译时遇到如下错误: ...error C2061: syntax error : identifier 'THIS_FILE' .../new(35) : err ...

  2. 使用gcc编译和链接C语言程序,用GCC编译链接程序--编译链接器GCC常用功能(菜鸟级)...

    转载自:http://daimajishu.iteye.com/blog/1089740 对gcc认识的一篇文章,就转载了,截取了自己感兴趣部分. 一,GCC编译器简介 虽然我们称Gcc是C语言的编译 ...

  3. [Vim 编译出错]syntax error: unexpected end of file

    系统环境:OSX 编辑器:vim 问题说明:编译文件时出现"Syntax error:unexpected end of file"错误 从网页粘贴到vi里的配置代码env.sh, ...

  4. (转)DirectShow9在VS2005或vc6.0下编译出现问题的解决方法

    1.我用的版本是DirectX9.0b ,没有安装,直接解压后放到一个文件夹里用 2.我按照以下的步骤操作成功.明天试着做个播放器. VFW(Video for Windows)是Microsoft推 ...

  5. Linux下C/C++程序编译链接加载过程中的常见问题及解决方法

    Linux下C/C++程序编译链接加载过程中的常见问题及解决方法 1 头文件包含的问题 报错信息 该错误通常发生在编译时,常见报错信息如下: run.cpp:2:10: fatal error: dl ...

  6. 从四个问题透析Linux下C++编译链接

    摘要:编译&链接对C&C++程序员既熟悉又陌生,熟悉在于每份代码都要经历编译&链接过程,陌生在于大部分人并不会刻意关注编译&链接的原理.本文通过开发过程中碰到的四个典型 ...

  7. linux取消头文件链接,【原创】Linux下编译链接中常见问题总结

    前言 一直以来对Linux下编译链接产生的问题没有好好重视起来,出现问题就度娘一下,很多时候的确是在搜索帮助下解决了BUG,但由于对原因不求甚解,没有细细研究,结果总是在遇到在BUG时弄得手忙脚乱得. ...

  8. Linux下C语言程序编写及执行和分步骤编译链接C源代码

    实验一:Linux下C语言程序编写及执行 //hello.c #include <stdio.h> int main(){int x = 1;int y = 2;int sum = x + ...

  9. Linux下动态链接库与静态链接库(编写、编译)

    这里写目录标题 函数库的概念 动态库的编译 静态库的编译 动态库相对于静态库的优点和缺点 优点 缺点 函数库的概念 函数库一般分为静态库和动态库两种. 静态库: 是指编译链接时,把库文件的代码全部加入 ...

最新文章

  1. 图像压缩算法动态规划c语言,图像压缩算法  动态规划
  2. DirectX 开发环境配置
  3. graylog2+syslog-ng+mongodb构建集中管理日志服务器 --转载
  4. centos nginx不是命令_虚拟机下Centos 8.0 安装PHP+Mysql+Nginx
  5. 怎么在坐标上面找outliner的异常检测方法,非监督学习
  6. 改变bantchsize发现loss增大_肺内发现磨玻璃结节,一定就是早期肺癌吗?
  7. 1006: 组合的输出(dfs的一种用法)(与排列类似)
  8. 在Unterfranken中搜索河流:如何使用Elasticsearch在地图上查找要素
  9. python语言指令大全_Python语言----linux常用命令(14)
  10. python是哪一年发明的_Python的发明,竟然是因为他不喜欢花括号。
  11. android 转场动画 共享元素,Android-Animation-Set
  12. 【视频转换】监控视频DAV转mp4
  13. 通俗易懂的LDA模型
  14. amoeba mysql_Amoeba介绍及Amoeba和mysql proxy有区别
  15. 开关电源LLC谐振变换器的工作原理
  16. 爱国html源码,鼠标点击网页爱国富强民主特效(附代码)
  17. 关于内存条低压标压以及不同品牌容量内存条组建双通道笔记
  18. matlab矩阵学习—郭彦甫老师笔记
  19. matlab鱼眼镜头,普通镜头,单目双目相机标定校正(四)
  20. 摇摇招车CEO:本月北京打车App将共用同一运营后台

热门文章

  1. 关于relief算法选择特征的问题
  2. android 自定义LabelView实现各类小标签,重要功能已标注
  3. linux内核级调用时间delay函数,及常用文件头
  4. 汽车信息安全系列-3.TI HSM笔记(更新中)
  5. 《实用C++》第10课:if 语句实现关系运算
  6. 【翻译】泛型图片库(GIL)教程(上)
  7. 产品Backlog 管理
  8. 安全合规/法案--32--《儿童个人信息网络保护规定》原文及解读
  9. 监控系统看这一篇就够了!zabbix、Prometheus等常见监控教程
  10. 金融学-风险中性测度