Skip to main content
GameDev.net gamedev.net
🔒 Locked

Gdiplus compile errors

Started by Xeile Feb 27, 2005 at 11:39 AM 5 replies 10.7k views
Original Post
Xeile
Xeile
Hello, I use MicroSoft Visual C++. When I try to build my application, I get around 300 errors, all found in the gdiplus includes. Has anyone the same problems and have you been able to solve this? Thank you.
Kippesoep
Kippesoep
Meer informatie alsjeblieft...

Tell us which version of MSVC you're using and post a few of the errors (try the first 10 or so).

Usually, if you get that many errors in a header, they tend to be things like undeclared identifiers, which usually means you forgot to include another header (e.g. make sure you include windows.h first).
Kippesoep
Xeile
Xeile
Ok,

Sorry for the lack of info,

I use MSV 6.0,
I did include windows.h
I also defined ULONG_PTR as a DWORD, I did this before the inclusion of gdiplus.h

Here are some errors:
e:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifiere:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'token' : undeclared identifiere:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to datae:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2071: 'NotificationHookProc' : illegal storage classe:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'e:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to datae:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage classe:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2059: syntax error : ')'e:\program files\microsoft sdk\include\gdiplusinit.h(86) : error C2059: syntax error : 'const'e:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'e:\program files\microsoft sdk\include\gdiplusinit.h(95) : warning C4229: anachronism used : modifiers on data are ignorede:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'e:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2059: syntax error : ')'e:\program files\microsoft sdk\include\gdiplusflat.h(2639) : warning C4229: anachronism used : modifiers on data are ignorede:\program files\microsoft sdk\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)e:\program files\microsoft sdk\include\gdiplusflat.h(2644) : error C2146: syntax error : missing ')' before identifier 'token'e:\program files\microsoft sdk\include\gdiplusflat.h(2644) : warning C4229: anachronism used : modifiers on data are ignored
Kippesoep
Kippesoep
This is a known problem if you haven't installed the full Platform SDK, but just the GDI+ headers. Download the entire thing and install that.
Kippesoep
Xeile
Xeile
Thank you for you help so far Kippesoup, I have downloaded the full Platform SDK and installed it now.

I still have the compile errors

Here are the top 10:
e:\program files\microsoft platform sdk\include\gdiplusimaging.h(67) : error C2501: 'MIDL_INTERFACE' : missing storage-class or type specifierse:\program files\microsoft platform 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 caste:\program files\microsoft platform sdk\include\gdiplusimaging.h(67) : error C2146: syntax error : missing ';' before identifier 'IImageBytes'e:\program files\microsoft platform sdk\include\gdiplusimaging.h(67) : error C2501: 'IImageBytes' : missing storage-class or type specifierse:\program files\microsoft platform sdk\include\gdiplusimaging.h(67) : error C2239: unexpected token ':' following declaration of 'IImageBytes'e:\program files\microsoft platform sdk\include\gdiplusimaging.h(67) : error C2059: syntax error : 'public'e:\program files\microsoft platform sdk\include\gdiplusimaging.h(246) : error C2146: syntax error : missing ';' before identifier 'id'e:\program files\microsoft platform sdk\include\gdiplusimaging.h(246) : error C2501: 'PROPID' : missing storage-class or type specifierse:\program files\microsoft platform sdk\include\gdiplusimaging.h(246) : error C2501: 'id' : missing storage-class or type specifierse:\program files\microsoft platform sdk\include\gdiplusheaders.h(384) : error C2629: unexpected 'class Gdiplus::Image ('


I merely included nothing else more. Can someone help me with this, please?
Kippesoep
Kippesoep
Include windows.h before gdiplus.h.
Also, make sure you don't define "WIN32_LEAN_AND_MEAN" anywhere.

Check out MS Knowledge base article 320234.
Kippesoep
Xeile
Xeile
Yep, it's compiling now, WIN32_MEAN_AND_LEAN was the trouble maker.

Well thanks alot.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.