views:

64

answers:

2

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

A: 

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.

foxwoods
A: 

Add this before your #include like this:

#define ULONG_PTR ULONG
#include <windows.h>
#include <gdiplus.h>
Romain Hippeau
I had to comment out lean and mean...
Milo