使用 GDI 编译时遇到问题+ (VC++2008)

发布于 2024-08-30 20:03:45 字数 16295 浏览 1 评论 0原文

我只是简单地包含 gdiplus.h 并得到所有这些错误:

Warning 32  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Warning 38  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Warning 49  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Warning 55  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Warning 61  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Warning 68  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Warning 74  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Warning 82  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   112 fatal error C1003: error count exceeds 100; stopping compilation    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  236
Error   1   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   7   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   8   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   94  error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   102 error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   110 error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   21  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   813
Error   23  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   820
Error   25  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   829
Error   27  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   923
Error   16  error C2535: 'Gdiplus::Image::Image(void)' : member function already defined or declared    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   471
Error   4   error C2470: 'IImageBytes' : looks like a function definition, but there is no parameter list; skipping apparent body   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   89  error C2448: 'Gdiplus::Metafile::{ctor}' : function-style initializer appears to be a function definition   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  76
Error   97  error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  199
Error   105 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  218
Error   2   error C2440: 'initializing' : cannot convert from 'const char [37]' to 'int'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   72  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   76  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   80  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   84  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   92  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   100 error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   108 error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   60  error C2275: 'Gdiplus::MetafileHeader' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   67  error C2275: 'Gdiplus::GpMetafile' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   31  error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   37  error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   48  error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   54  error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   3   error C2146: syntax error : missing ';' before identifier 'IImageBytes' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   6   error C2146: syntax error : missing ';' before identifier 'id'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   73  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   81  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   93  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   101 error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   109 error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   96  error C2143: syntax error : missing ';' before '{'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  199
Error   104 error C2143: syntax error : missing ';' before '{'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  218
Error   33  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   39  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   50  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   56  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   62  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   69  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   75  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   83  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   29  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   35  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   46  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   52  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   58  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2222
Error   65  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   71  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2309
Error   79  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2320
Error   88  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  75
Error   91  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  194
Error   99  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  211
Error   107 error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  230
Error   66  error C2065: 'metafile' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   28  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   34  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   45  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   51  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   57  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2222
Error   64  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   70  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2309
Error   78  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2320
Error   87  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  75
Error   90  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  194
Error   98  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  211
Error   106 error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  230
Error   30  error C2065: 'image' : undeclared identifier    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   36  error C2065: 'image' : undeclared identifier    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   59  error C2065: 'header' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   47  error C2065: 'bitmap' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   53  error C2065: 'bitmap' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   12  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   443
Error   13  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   444
Error   14  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   445
Error   15  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   453
Error   41  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1244
Error   42  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1247
Error   43  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1250
Error   44  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1262
Error   9   error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   384
Error   10  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   395
Error   11  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   405
Error   17  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   505
Error   18  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   516
Error   19  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   758
Error   20  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   813
Error   22  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   820
Error   24  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   829
Error   26  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   855
Error   40  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1156
Error   63  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2242
Error   86  error C2061: syntax error : identifier 'byte'   c:\program files\microsoft sdks\windows\v7.0\include\gdipluspath.h  133
Error   5   error C2059: syntax error : 'public'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   77  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2316
Error   85  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2327
Error   95  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  198
Error   103 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  217
Error   111 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  236

我尝试将我的 sdk 更新到 7.0 但没有帮助。我什至没有对 API 进行任何调用。 谢谢

I just simply include gdiplus.h and get all these errors:

Warning 32  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Warning 38  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Warning 49  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Warning 55  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Warning 61  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Warning 68  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Warning 74  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Warning 82  warning C4229: anachronism used : modifiers on data are ignored c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   112 fatal error C1003: error count exceeds 100; stopping compilation    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  236
Error   1   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   7   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   8   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   94  error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   102 error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   110 error C2761: '{ctor}' : member function redeclaration not allowed   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   21  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   813
Error   23  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   820
Error   25  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   829
Error   27  error C2535: 'Gdiplus::Metafile::Metafile(void)' : member function already defined or declared  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   923
Error   16  error C2535: 'Gdiplus::Image::Image(void)' : member function already defined or declared    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   471
Error   4   error C2470: 'IImageBytes' : looks like a function definition, but there is no parameter list; skipping apparent body   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   89  error C2448: 'Gdiplus::Metafile::{ctor}' : function-style initializer appears to be a function definition   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  76
Error   97  error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  199
Error   105 error C2447: '{' : missing function header (old-style formal list?) c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  218
Error   2   error C2440: 'initializing' : cannot convert from 'const char [37]' to 'int'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   72  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   76  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   80  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   84  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   92  error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   100 error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   108 error C2275: 'HDC' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   60  error C2275: 'Gdiplus::MetafileHeader' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   67  error C2275: 'Gdiplus::GpMetafile' : illegal use of this type as an expression  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   31  error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   37  error C2275: 'Gdiplus::GpImage' : illegal use of this type as an expression c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   48  error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   54  error C2275: 'Gdiplus::GpBitmap' : illegal use of this type as an expression    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   3   error C2146: syntax error : missing ';' before identifier 'IImageBytes' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   6   error C2146: syntax error : missing ';' before identifier 'id'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   280
Error   73  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   81  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   93  error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  195
Error   101 error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  212
Error   109 error C2146: syntax error : missing ')' before identifier 'referenceHdc'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  231
Error   96  error C2143: syntax error : missing ';' before '{'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  199
Error   104 error C2143: syntax error : missing ';' before '{'  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  218
Error   33  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   39  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   50  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   56  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   62  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   69  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   75  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2310
Error   83  error C2078: too many initializers  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2321
Error   29  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   35  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   46  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   52  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   58  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2222
Error   65  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   71  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2309
Error   79  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2320
Error   88  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  75
Error   91  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  194
Error   99  error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  211
Error   107 error C2065: 'stream' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  230
Error   66  error C2065: 'metafile' : undeclared identifier c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   28  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   34  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   45  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   51  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   57  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2222
Error   64  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2262
Error   70  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2309
Error   78  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2320
Error   87  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  75
Error   90  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  194
Error   98  error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  211
Error   106 error C2065: 'IStream' : undeclared identifier  c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  230
Error   30  error C2065: 'image' : undeclared identifier    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1133
Error   36  error C2065: 'image' : undeclared identifier    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1139
Error   59  error C2065: 'header' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2224
Error   47  error C2065: 'bitmap' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1286
Error   53  error C2065: 'bitmap' : undeclared identifier   c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1292
Error   12  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   443
Error   13  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   444
Error   14  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   445
Error   15  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   453
Error   41  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1244
Error   42  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1247
Error   43  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1250
Error   44  error C2061: syntax error : identifier 'PROPID' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1262
Error   9   error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   384
Error   10  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   395
Error   11  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   405
Error   17  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   505
Error   18  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   516
Error   19  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   758
Error   20  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   813
Error   22  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   820
Error   24  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   829
Error   26  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusheaders.h   855
Error   40  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  1156
Error   63  error C2061: syntax error : identifier 'IStream'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2242
Error   86  error C2061: syntax error : identifier 'byte'   c:\program files\microsoft sdks\windows\v7.0\include\gdipluspath.h  133
Error   5   error C2059: syntax error : 'public'    c:\program files\microsoft sdks\windows\v7.0\include\gdiplusimaging.h   74
Error   77  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2316
Error   85  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusflat.h  2327
Error   95  error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  198
Error   103 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  217
Error   111 error C2059: syntax error : ')' c:\program files\microsoft sdks\windows\v7.0\include\gdiplusmetafile.h  236

I tried updating my sdk to 7.0 but it did not help. I'm not even making any calls to the API.
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巡山小妖精 2024-09-06 20:03:45

在 #include 之前添加此内容,如下所示:

#define ULONG_PTR ULONG
#include <windows.h>
#include <gdiplus.h>

Add this before your #include like this:

#define ULONG_PTR ULONG
#include <windows.h>
#include <gdiplus.h>
海的爱人是光 2024-09-06 20:03:45

您可能需要将包含目录和库目录添加到 VC++ 中的项目设置中。

一种方法是转到“工具”->“选项->项目和解决方案 -> VC++ 目录。

You probably need to add the include and library directories to the project settings in VC++.

One way to do that is to go Tools -> Options -> Projects and Solutions -> VC++ Directories.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文