Click here to Skip to main content
Licence CPOL
First Posted 23 May 2002
Views 127,967
Downloads 533
Bookmarked 29 times

Hints to get GDI+ running

By | 24 May 2002 | Article
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)

About the Author

CodeMaze

Web Developer

Germany Germany

Member

student

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 5 Pinmembermanoj kumar choubey0:17 17 Feb '12  
GeneralErrors because of new operator in debug builds Pinmember85w3gchen523:25 17 Apr '11  
GeneralLNK1103 imagingguds.obj PinmemberBob2H4:10 28 Dec '10  
GeneralUnresolved External link GdiplusShutdown Pinmemberlingolotti0:45 5 Dec '07  
Generalerrors in GdiplusEnums.h Pinmembersupersass121:59 25 Sep '07  
QuestionLinker Error LNK : 1103 PinmemberSumedh Jiwane20:33 16 Jul '06  
AnswerRe: Linker Error LNK : 1103 PinmemberSumedh Jiwane21:16 16 Jul '06  
GeneralRe: Linker Error LNK : 1103 Pinmembernuttycrunch4:41 23 Sep '08  
GeneralProblem with Microsoft SDK PinmemberpippoScop22:58 8 May '06  
QuestionUrgent Help Needed??? Pinmemberberk_atabek2:57 18 Dec '05  
AnswerRe: Urgent Help Needed??? [modified] PinmemberSumedh Jiwane20:22 16 Jul '06  
GeneralIs there any GDI+ Version Other than version 1.0 Pinsusspubbas19:18 21 May '04  
GeneralErrors on compile Pinmemberstealth kid4:10 19 Jun '03  
GeneralRe: Errors on compile PinmemberRyan Binns23:44 22 Jun '03  
GeneralA More Constructive Comment Pinmembertterb4514:44 24 Apr '06  
GeneralRe: Errors on compile Pinmembermuniswara20:17 17 Jun '07  
GeneralRe: Errors on compile Pinmemberdguki5:46 30 Nov '07  
GeneralRe: Errors on compile v2 Pinmemberjorgegrana6:04 27 Aug '08  
GeneralCompilation problem... PinsussRoli0:02 2 Aug '02  
General102 Errors during compile PinmemberGregor S.11:48 17 Jul '02  
GeneralRe: 102 Errors during compile Pinmembercullendavis11:55 25 Oct '02  
GeneralRe: 102 Errors during compile PinsussMutor4:06 31 Mar '04  
GeneralRe: 102 Errors during compile Pinmemberstereosbj3:44 16 Jul '04  
GeneralLinker error PinmemberMichael Kuelshammer5:58 6 Jul '02  
GeneralRe: Linker error PinmemberHidde Wallaart4:43 13 Aug '02  

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

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 24 May 2002
Article Copyright 2002 by CodeMaze
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid