Hi everyone,

I am using TC 3.0 . I'm getting an error as.. BGI error:graphics not initialized. But I've used initgraph. So, i thought i'll use this

/* read result of initialization */
   errorcode = graphresult();
   /* an error occurred */
   if (errorcode != grOk)
   {
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();

      exit(1);    /* terminate with an error code */
   }

I'm getting an error.. Graphics error: Device driver file not found <EGAVGA.BGI> Press any key to halt.

What does this mean? Please can anyone help me? Am i missing an obvious point?? Plzzz help !

Recommended Answers

All 3 Replies

what operating system?

Hi,

Oops sorry! I had not put double slash in the "path" in initgraph. :o Its working now. Anyway,thanks a lot.

And the OS is xp.. but i don't get it.. how does it matter??

hi all i am using windows 7 ultimate and i got this same error when i run my pgm also i got linker error like you...bt i solved this prbl by using DOSBOX 0.74..now my pgm is running smoothly..i have followed these steps
1.download dosbox 0.74
2.create a folder say "Turbo" in c:\
3.download turboc for window 7 ultimate 32 bit
4.extract zip file into "Turbo"
5.from START->Dosbox->options->dosbox options->(you can see a word documnet open it)->@ the end of document add the following steps
mount d c:\Turbo\
d:
cd tc
cd bin
tc
then save
6.then go to c window(c:\turbo\tc\bin\tc.exe)->directories->type D:\TC\INCLUDE
and D:\TC\LIB
7.also in Linker->Libraries->enable Graphics library
8.also put a line in main()
initgraph(&gd,&gm,"d;\\tc\\bgi");
Best of luck..........:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.