Some tips

本站充满一个无聊的人的一些奇技淫巧

星期六, 十一月 22, 2008

VC6编译gdiplus程序出错

用VC6进行Win32开发,用到gdiplus的函数,在头文件已经包含了:
#define UNICODE
#include
#include
using namespace Gdiplus;
但是编译仍然出错,共102个错误,前面几个是:
c:\program files\microsoft sdk\include\gdiplusimaging.h(67) : error C2501: 'MIDL_INTERFACE' : missing storage-class or type specifiers
c:\program files\microsoft sdk\include\gdiplusimaging.h(67) : error C2440: 'initializing' : cannot convert from 'char [37]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
c:\program files\microsoft sdk\include\gdiplusimaging.h(67) : error C2146: syntax error : missing ';' before identifier 'IImageBytes'
解决方法:
在stdafx.h中注释掉该语句:
#define WIN32_LEAN_AND_MEAN

标签:

0 条评论:

发表评论

订阅 博文评论 [Atom]

<< 主页