On 26 May 2004 at 20:26, Brian Downing wrote:
> I'm new to programming windows, so bear with me! I am using the
> Dev-C++ compiler and have what I hope is a simple problem. I am
> going over code in a game programming text and the functions that
are
> related to GDI (MovetoEx, LineTo, CreateSolidBrush, etc) are
showing
> as linker errors (undefined references). The files are all open
> under the same project. I'm including windows.h. Any suggestions?
You have to link the GDI library in. If it's a standalone/non-
project file, then go to Compiler Options and add -lgdi32 to the link
command line. If it's a project, go to Project Options->Parameters
and add -lgdi32 to the Linker.
In general, if you have a function or functions that aren't getting
linked in, you can search for the function names in the lib
directory. The file will be named something like libgdi32.a. You
include that into the linker by adding -l and then stripping of the
lib and the '.a'.
BTW, if you have Windows XP, then your search function is "broken".
Read this:
http://www.pcmag.com/article2/0,4149,1202777,00.asp
HTH.
Watson Davis
|