GDI+ 编程 关于VS2008的配置


来源:http://bbs.csdn.net/topics/370170739


问题:

小弟最近学习关于GDI+的编程。。
关于vs2008的配置问题。
百度搜索了相关配置,但是貌似都不起作用啊。
将include lib等文件都放入vs2008的安装目录里面去了。
然后再stdafx.h里面添加gdiplus.h头文件以及命名空间等,可是编译的时候出错啊。求指点。。

g:\visualstudio2008\vc\include\gdiplusenums.h(29) : error C2146: 语法错误 : 缺少“;”(在标识符“GraphicsState”的前面)
1>g:\visualstudio2008\vc\include\gdiplusenums.h(29) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>g:\visualstudio2008\vc\include\gdiplusenums.h(29) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>g:\visualstudio2008\vc\include\gdiplusenums.h(532) : error C2146: 语法错误 : 缺少“;”(在标识符“ObjectTypeIsValid”的前面)
1>g:\visualstudio2008\vc\include\gdiplusenums.h(532) : error C2433: “BOOL”: 不允许在数据声明中使用“inline”
1>g:\visualstudio2008\vc\include\gdiplusenums.h(532) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>g:\visualstudio2008\vc\include\gdiplusenums.h(535) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>g:\visualstudio2008\vc\include\gdiplusenums.h(558) : error C2065: “META_SETBKCOLOR”: 未声明的标识符
1>g:\visualstudio2008\vc\include\gdiplusenums.h(558) : error C2056: 非法表达式
1>g:\visualstudio2008\vc\include\gdiplusenums.h(559) : error C2065: “META_SETBKMODE”: 未声明的标识符
1>g:\visualstudio2008\vc\include\gdiplusenums.h(559) : error C2056: 非法表达式
1>g:\visualstudio2008\vc\include\gdiplusenums.h(560) : error C2065: “META_SETMAPMODE”: 未声明的标识符
1>g:\visualstudio2008\vc\include\gdiplusenums.h(560) : error C2056: 非法表达式
1>g:\visualstudio2008\vc\include\gdiplusenums.h(561) : error C2065: “META_SETROP2”: 未声明的标识符
1>g:\visualstudio2008\vc\include\gdiplusenums.h(561) : error C2056: 非法表达式
1>g:\visualstudio2008\vc\include\gdiplusenums.h(562) : error C2065: “META_SETRELABS”: 未声明的标识符
1>g:\visualstudio2008\vc\include\gdiplusenums.h(562) : error C2056: 非法表达式
1>g:\visualstudio2008\vc\include\gdiplusenums.h(563) : error C2065: “META_SETPOLYFILLMODE”: 未声明的标识符


解决:

在 stdAfx.h中加入  
#include <comdef.h>




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值