Error im graphics program

/*A program to draw a space with stars*/
#include<graphics.h>
main()
{
int gd=DETECT,gm;
int i,x,y;
initgraph(&gd,&gm,"");
line(0,0,640,0);
line(0,0,0,480);
line(639,0,639,480);
line(639,479,0,479);
for(i=0;i<=1000;i++)
{
x=rand()%639;
y=rand()%480;
putpixel(x,y,15);
}
getch();
closegraph();
}
/* End of program */
These Errors when run program but when compile the program not.
Undefined symbol _initgraph in module graph.c
Undefined symbol _line in module graph.c
Undefined symbol _closegraph in module graph.c
Undefined symbol _putpixel in module graph.c


what worng with this.
i'm using Turbo C 3.0 (plz don't say change compiler)
do you have EGAVGA.BIG present in BGI folder?
yes present
ok then do you have graphics library enabled?There are four library setups in turbo c 3.0

I had problem with same some time ago.
then check if graphics library is enabled or not?Don't know procedure do check/do it.Just google it.

In Turbo c 3.0 you need to enable it.I had same problem some time ago.

Also I suggest you to move to newer IDE.Maybe Visual C++ version 8 or 10 or 12
Topic archived. No new replies allowed.