When I include gdiplus.h
in a program that compiles well the first(there are many) error I get is:
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\GdiplusImaging.h(77): error C2504: 'IUnknown' : base class undefined
Part of GdiplusImaging.h:
IImageBytes : public IUnknown <<< error!
{
public:
...
Why it is so? Where is this IUnknown class? And why it's not in GdiplusImaging.h?
My system is Windows7 x64. VisualStudio 2010.
Including part:
#include <windows.h>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib, "gdiplus.lib")
You should try to add windows.h
and Unknwn.h
header before gdiplus.h
#include <Unknwn.h>
#include <windows.h>
#include <gdiplus.h>
These are the standard includes for using GDI+:
#include <windows.h>
#include <objidl.h>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib,"Gdiplus.lib")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With