Click here to Skip to main content
15,893,486 members
Articles / Multimedia / GDI+
Article

Hints to get GDI+ running

Rate me:
Please Sign up or sign in to vote.
3.33/5 (12 votes)
24 May 2002CPOL1 min read 180.6K   2.3K   29   33
How to avoid compiler-errors and problems with the DLL.

Introduction

First, many thanks to everybody who are contributing to this great community. And of course, special thanks to all the people behind the scenes of CodeProject.

During my first steps with GDI+, I had several problems. Trying to get some advice, I realized, not to be the only one having those compiler-errors and problems with the DLL.

So, here is how I got it up and running.

What to do

I downloaded the Microsoft SDK (November 01 version) which includes GDI+. Because it's a quite huge package, I posted the necessary files in this article, but don't blame me, I never tried it this way. I just installed SDK and took the GDI+ files out of the appropriate folders.

Thanks to Christian Graus, see his article "Starting with GDI+" to get information about initialization in code.

To avoid compiler-errors, make sure that #include <gdiplus.h> is declared in stdafx.h after the standard includes such as #include <afxwin.h>, #include <afxext.h>, #include <afxdisp.h>, #include <afxdtctl.h> etc., so that all declarations are existing when gdiplus.h is parsed.

If the GDI+ include files and .lib are not in the appropriate folders of VC++, set the path to those folders via tools/options and the tab "folders".

The .dll:

GdiPlus.dll is provided with WinXP only.

All other Win-OSs need the one provided with the zip-file above. Don't copy it to the System-folder, instead put it in your app's private folder, the one which also contains the EXE. E.g., the Release or Debug folder of your project during development.

Of course, you also have to name the GdiPlus.lib-include-library under project/settings/linker.

That's all, now it should work fine.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Germany Germany
student

Comments and Discussions

 
GeneralRe: Linker error Pin
Ano Nymous3-Nov-04 5:57
Ano Nymous3-Nov-04 5:57 
GeneralRe: Linker error Pin
koda_xii3-Jul-05 23:01
koda_xii3-Jul-05 23:01 
GeneralRe: Linker error Pin
stealth kid24-Jun-03 0:51
stealth kid24-Jun-03 0:51 
GeneralRe: Linker error Pin
pani6817-Jul-03 2:11
pani6817-Jul-03 2:11 
GeneralRe: Linker error Pin
kahoo9-Mar-04 4:44
kahoo9-Mar-04 4:44 
GeneralRe: Linker error Pin
Anonymous18-May-04 11:50
Anonymous18-May-04 11:50 
GeneralRe: Linker error Pin
mohdalwi21-May-04 20:46
mohdalwi21-May-04 20:46 
GeneralRe: Linker error Pin
mandrago1324-Oct-04 9:13
mandrago1324-Oct-04 9:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.