I'm just new to C and im having an error pop up and waas wondering if you guys could help.
This is the program I have
Quote:
#include
#include
#include
#include
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "");
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
line(0, 0, getmaxx(), getmaxy());
getch();
closegraph();
return 0;
}
|
And these are the Error messages...
Quote:
Linking ..\OUTPUT\NONAME00.EXE:
Linker Error: Undefined symbol _closegraph in module NONAME00.CPP
Linker Error: Undefined symbol _line in module NONAME00.CPP
Linker Error: Undefined symbol _getmaxx in module NONAME00.CPP
Linker Error: Undefined symbol _getmaxy in module NONAME00.CPP
Linker Error: Undefined symbol _grapherrormsg in module NONAME00.CPP
Linker Error: Undefined symbol _graphresult in module NONAME00.CPP
•Linker Error: Undefined symbol _initgraph in module NONAME00.CPP
|
The program is copied exactly out of the help file in C... its the initgraph function that i got it from.
I'm using turbo c++
Cheers