Help using Gdi32.lib

closed account (ozUkoG1T)
hey C++ forums again,
This time i am struggling with using the Gdi32.lib i can link and every thing but do not know how to use it because i am looking at game making tutorials but they say "i already assume you know how to use Gdi32.lib in you're program" but even if i try to find how to use it but the problem is i just can't find it. Please anyone who know or has used this please give me an tutorial of some kind thanks in advance.
Your IDE should have a folder called "lib", it will be in there. If you are using the Mingw compiler though the libraries are named differently to indicate what compiler they are meant for. This one would be "libgdi32.a" and functionally there is little difference between the two.
closed account (ozUkoG1T)
Hey Computer geek i use Microsoft visual studio 2010 ultimate.
The other thing is that it shows no errors so how to exactly use it now. Please!
Last edited on
If you send us a link to the tutorial you are using it would give us some context to work off of. You link to the library with the pre-processor command:
#pragma comment(lib, "gdi32.lib")
closed account (ozUkoG1T)
the tutorial is:
After you've linked to the library you need to include the correct header to expose the functions to your program. The tutorial here neglects to include 'Wingdi.h' which is where most of these functions are declared. Insert #include<wingdi.h> underneath #include <windows.h> and let us know if you have any more problems.
closed account (ozUkoG1T)
Thanks it works but do you know how to use and add multimedia
That questions a little to broad, multimedia describes everything from images, to sound and movies. Each one would be handled differently. This is a good place to start:
But that really only covers graphics. This one would be a more direct answer to your question:
closed account (ozUkoG1T)
Topic archived. No new replies allowed.