Advertisement

gdiplus weird errors

Started by February 08, 2023 09:19 AM
2 comments, last by ms75214 1 year, 10 months ago

I just created a new Windows project in MS VC++.

I simply added the header gdiplus.h. So, my headers look like so:

#include "framework.h"

#include "BezierCurveTest.h"
#include <gdiplus.h>

For some reason, I am now getting all these weird errors like so:

Severity Code Description Project File Line Suppression State

Error (active) E0020 identifier "IStream" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 50

Error (active) E0020 identifier "IStream" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 85

Error (active) E0020 identifier "Status" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 124

Error (active) E0020 identifier "Status" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 137

Error (active) E0020 identifier "Status" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 150

Error (active) E0020 identifier "IStream" is undefined BezierCurveTest C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\gdiplusbitmap.h 152

Anyone know why this is happening?

Thank you.

You're not including all the header files that are needed. You might be using some preprocessor directives that exclude a bunch of advanced headers, like WIN32_LEAN_AND_MEAN or VC_EXTRALEAN. While they can make the code compile slightly faster for simple programs, they exclude a lot of core windows functionality like multimedia effects, data exchange, shell functionality, networking, encryption, performance tuning, and more.

Advertisement

@frob I commented this out:

#define WIN32_LEAN_AND_MEAN    

It works now.

This topic is closed to new replies.

Advertisement