Every time I try to run my code I get this error. I've tried everything, installing the SDK, but I still get the same error.
1>------ Build started: Project: ConsoleApplication6, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'gdi32.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm using Windows 7 and Visual Studio 2012.
From what I understand you haven't defined the path of your library.
Right click on Project --> Properties
Under Configuration properties, on "Linker" tab, select "General" on "Additional Library Directories". Select the path of gdi32.lib:
Then go to the Input tab (below on the General tab).
Double Click or select edit to add gdi32.lib:
Finally add your "gdi32.lib" and click OK.
By the way, in Visual Studio 2013 ultimate edition, by default it has gdi32.lib.
I hope it solves your problem.