Win32: Casting Trouble Programming Software Development by WolfShield … using C++ (instead of C in the tutorial) and the WinGW compiler. When I compile the below code I get this… Re: Help me get spyware! Hardware and Software Information Security by caperjack ….EXE] C:\WINDOWS\SYSTEM\IEMN.EXE O4 - HKLM\..\RunServices: [WINGW.EXE] C:\WINDOWS\WINGW.EXE O4 - HKLM\..\RunServices: [MSLG32.EXE] C:\WINDOWS… Re: Win32: Casting Trouble Programming Software Development by triumphost Link to `gdi32.a` Whenever you get an undefined reference error, it means you don't have the right libraries linked and the linker cannot find your function. In your case: Library Gdi32.lib DLL Gdi32.dll Most of the time, if you do not know the library, search for the function on MSDN: http://msdn.microsoft.com/en-us/library/… Re: Win32: Casting Trouble Programming Software Development by WolfShield Does `#include <wingdi.h>` not include those libraries? Re: Win32: Casting Trouble Programming Software Development by ravenous >Does #include <wingdi.h> not include those libraries? No, only the function declarations are generally in the header file. The declarations are enough for the compiler to compile the code that is calling the function. However, when the linker (that's what the `ld` part of the error is referring to) tries to link the object files …