Click here to Skip to main content
15,886,578 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.5K   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

 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey17-Feb-12 0:17
professionalManoj Kumar Choubey17-Feb-12 0:17 
GeneralErrors because of new operator in debug builds Pin
85w3gchen517-Apr-11 23:25
85w3gchen517-Apr-11 23:25 
GeneralLNK1103 imagingguds.obj Pin
Bob2H28-Dec-10 4:10
Bob2H28-Dec-10 4:10 
GeneralUnresolved External link GdiplusShutdown Pin
lingolotti5-Dec-07 0:45
lingolotti5-Dec-07 0:45 
Generalerrors in GdiplusEnums.h Pin
supersass125-Sep-07 21:59
supersass125-Sep-07 21:59 
QuestionLinker Error LNK : 1103 Pin
Sumedh Jiwane16-Jul-06 20:33
Sumedh Jiwane16-Jul-06 20:33 
AnswerRe: Linker Error LNK : 1103 Pin
Sumedh Jiwane16-Jul-06 21:16
Sumedh Jiwane16-Jul-06 21:16 
GeneralRe: Linker Error LNK : 1103 Pin
nuttycrunch23-Sep-08 4:41
nuttycrunch23-Sep-08 4:41 
GeneralProblem with Microsoft SDK Pin
pippoScop8-May-06 22:58
pippoScop8-May-06 22:58 
QuestionUrgent Help Needed??? Pin
berk_atabek18-Dec-05 2:57
berk_atabek18-Dec-05 2:57 
AnswerRe: Urgent Help Needed??? [modified] Pin
Sumedh Jiwane16-Jul-06 20:22
Sumedh Jiwane16-Jul-06 20:22 
GeneralIs there any GDI+ Version Other than version 1.0 Pin
pubududilena21-May-04 19:18
pubududilena21-May-04 19:18 
GeneralErrors on compile Pin
stealth kid19-Jun-03 4:10
stealth kid19-Jun-03 4:10 
GeneralRe: Errors on compile Pin
Ryan Binns22-Jun-03 23:44
Ryan Binns22-Jun-03 23:44 
GeneralA More Constructive Comment Pin
tterb4524-Apr-06 14:44
tterb4524-Apr-06 14:44 
GeneralRe: Errors on compile Pin
muniswara17-Jun-07 20:17
muniswara17-Jun-07 20:17 
GeneralRe: Errors on compile Pin
dguki30-Nov-07 5:46
dguki30-Nov-07 5:46 
GeneralRe: Errors on compile v2 Pin
jorgegrana27-Aug-08 6:04
jorgegrana27-Aug-08 6:04 
GeneralCompilation problem... Pin
rv262-Aug-02 0:02
rv262-Aug-02 0:02 
General102 Errors during compile Pin
User 665817-Jul-02 11:48
User 665817-Jul-02 11:48 
GeneralRe: 102 Errors during compile Pin
CullenDavis25-Oct-02 11:55
CullenDavis25-Oct-02 11:55 
GeneralRe: 102 Errors during compile Pin
MuToR31-Mar-04 4:06
MuToR31-Mar-04 4:06 
GeneralRe: 102 Errors during compile Pin
stereosbj16-Jul-04 3:44
stereosbj16-Jul-04 3:44 
GeneralLinker error Pin
6-Jul-02 5:58
suss6-Jul-02 5:58 
GeneralRe: Linker error Pin
Hidde Wallaart13-Aug-02 4:43
Hidde Wallaart13-Aug-02 4:43 

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.