Re: a vc project which use GDI+, i get the following errors:



You've included gdiplus.lib in your project?
You also need to add the statement
using namespace Gdiplus;
in your code

Regards,
Ron Francis
www.RonaldFrancis.com


"Jakein2006" <peng_xh@xxxxxxx> wrote in message
news:7D671F43-83C9-4744-A1BA-19626B97D631@xxxxxxxxxxxxxxxx

when i compile a vc project which use GDI+, i get the following errors:
please tell me how to correct it and I apprecaite your help.

c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(32)
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(32) : error
C2065: 'token' : undeclared identifier
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(32) : error
C2165: 'left-side modifier' : cannot modify pointers to data
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(32) : error
C2071: 'NotificationHookProc' : illegal storage class
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(33) : error
C2146: syntax error : missing ')' before identifier 'token'
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(33) : error
C2165: 'left-side modifier' : cannot modify pointers to data
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(33) : error
C2071: 'NotificationUnhookProc' : illegal storage class
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(33) : error
C2059: syntax error : ')'
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(86) : error
C2059: syntax error : 'const'
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(95) : error
C2146: syntax error : missing ')' before identifier 'token'
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(95) : warning
C4229: anachronism used : modifiers on data are ignored
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(95) : error
C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\englishprogramfile\vc\platformsdk\include\gdiplusinit.h(95) : error
C2059: syntax error : ')'
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2639) : warning
C4229: anachronism used : modifiers on data are ignored
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2639) : 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)
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2644) : error
C2146: syntax error : missing ')' before identifier 'token'
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2644) : warning
C4229: anachronism used : modifiers on data are ignored
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2644) : error
C2182: 'GdiplusNotificationUnhook' : illegal use of type 'void'
c:\englishprogramfile\vc\platformsdk\include\gdiplusflat.h(2644) : error
C2059: syntax error : ')'
d:\gdi+project\sourceimageviewernewver\cimageprocess.h(47) : error C2146:
syntax error : missing ';' before identifier 'm_gdiplusToken'
d:\gdi+project\sourceimageviewernewver\cimageprocess.h(47) : error C2501:
'ULONG_PTR' : missing storage-class or type specifiers
d:\gdi+project\sourceimageviewernewver\cimageprocess.h(47) : error C2501:
'm_gdiplusToken' : missing storage-class or type specifiers
d:\gdi+project\sourceimageviewernewver\cimageprocess.cpp(19) : error
C2065:
'GdiplusStartup' : undeclared identifier
d:\gdi+project\sourceimageviewernewver\cimageprocess.cpp(19) : error
C2065:
'm_gdiplusToken' : undeclared identifier



--
jake


.



Relevant Pages

  • Re: a vc project which use GDI+, i get the following errors:
    ... using namespace Gdiplus; ... C2071: 'NotificationUnhookProc': illegal storage class ... C2059: syntax error: 'const' ... C4229: anachronism used: modifiers on data are ignored ...
    (microsoft.public.win32.programmer.gdi)
  • GDI+ failing !!? HELP...
    ... GDI+ is failing on my VC6, ... error C2065: 'ULONG_PTR': undeclared identifier ... error C2165: 'left-side modifier': cannot modify pointers to data ... error C2059: syntax error: 'const' ...
    (microsoft.public.vc.mfc)
  • GDI+ failing !!? HELP...
    ... GDI+ is failing on my VC6, ... error C2065: 'ULONG_PTR': undeclared identifier ... error C2165: 'left-side modifier': cannot modify pointers to data ... error C2059: syntax error: 'const' ...
    (microsoft.public.vc.language)
  • Re: WINDDK is not getting compiled
    ... > declaration of 'DEVNODEID_W' ... > anachronism used: modifiers on data are ignored ...
    (microsoft.public.development.device.drivers)
  • DCOracle2 and header files ??
    ... database we have to it. ... dco2.c:3275: error: (Each undeclared identifier is reported only once ... dco2.c:3275: error: syntax error before ')' token ... the header files that should be there, ...
    (comp.lang.python)