Hi all,

I have already used InitGraph and have given the path(C:\\TC\BGI) in Initgraph and checked the Graphics option in Linker Options. Still Iam getting this error. I want a solution. Can somebody pls help me. Its urgent.

A wild stab in the dark suggests that you need to double up the second \ in your pathname, so


But since you've only paraphrased the problem, who knows whether that typo exists in your actual code, or whether there is some other problem you haven't bothered to mention. Post actual code if you want a fast accurate response.

> Can somebody pls help me.

> Its urgent.

of course the BGI is 20+ year old technology first developed for DOS 3 and never meant for use under Windows so it's quite possible even if you called the method that it failed and you didn't properly handle that failure.

Hi all,

The option is working in my office while it is not working in my home system. Pls help me fix this problem.


Go to c:\tc and make sure there is a folder named "BGI" and that the drivers are in it.

Well , Using the same ancient Turbo C++ 3.0 in school, i ran into the same problem. The two lines of graphics above should be :
Assuming that you installed Turbo C to C:\TC

int gd=DETECT,gm;

Obviously include the graphics.h.
If it still doesnt work , Press CTRL-F , then D.
(Dos Shell from the Compiler File Menu).
Write :


It should work now. If it still doesnt work , im pretty sure that its a corrupted installation or you are missing the *.BGI Files.
Also , I think you'd have done this , but dont forget to enable the Graphics Libraries in Options > Linker > Libraries.

You are required to check whether the compiler is installed in c drive or not
if it is installed in other drive u must specify the program as
for eg. it is installed in d drive


and also change the path in the compilers directory

thanks guys mah first day on this website and i got the answer for mah question.....the same of bgi error

just copy the file egavga.bgi from your /bgi folder and paste it in your /bin folder.
You should'nt be getting the error any more.

Thank u guys....me too got d same error nd resolved it :)

Dear Indrapriya,

Please mark the problem as solved.

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\
cd tc
cd bin
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()
Best of luck..........:)

initgraph(&gd, &gm, "C:\\TC\\BGI");
What does the "\\" in the path specified in initgraph signify?

The path to the BGI drivers.

I meant what does the usage of \\ instead of \ mean? What is its significance?

The backslash char is an escape char in C. It's paired up with another char to represent something difficult to type: like \n for a newline char, or \t for a tab, etc.

Two backslashes is used when you want to delineate just one backslash itself.


hello frnds ........on Window 7 error occur or not output show of graphics.h program..........for this i have simple one solution.....
go to end link and check .....and forward this for other .because i understand this that i have face............so help others .......not forget to say thanx.....

link--> http://www.uniqueness-template.com/devcpp/

read carefully all steps.......


commented: Worthless resurrection of an old post. -3

dear shahana....
ur post ws realy helpful...........thnkxxxxxx it solved ma probs.........

You can also use instead-

int gd=DETECT,gm;

pleaser close this thread its too old(4 yrs) now.....

pleaser close this thread its too old(4 yrs) now.....

Normally I would say the same thing, except that most of the "bump" comments were praising the information on this thread. While that isn't adding anything useful to this thread, it takes effort to browse Google, find this information, and feel so compelled by its influence that they go through the entire DaniWeb registration procedure just to thank the poster.

Also, just to play the devils advocate, you yourself submitted a comment to a 4 year old thread before your comment that no one else should. Ironic.

By the way, 2007 was a great year.

thank u guys the same problem for me. I solved it today. it is useful for my practicals exam

Go to c:\tc and make sure there is a folder named "BGI" and that the drivers are in it.

my problem still is not gtn solved the program gets suck in the middle and on pressing alt+f5 it says bgi error

Thank u guys....me too got d same error nd resolved it :)

wat did u do??

YOW It REally helped !! thanks a lot !! Av4ash !!

BGI Error:- Graphics not Initialized(Use Initgraph)

I have already used InitGraph and have given the path(C:\TC\BGI) in Initgraph and checked the Graphics option also..Its my windows7 & turbo c 3.. I just want to draw a circle by using graphics in c.But its showing while running undefined symbol _circle in module noname.cpp
Can any one please help me..Its urgent
Thanks in advance

thanks a lot avi4ash man ur a life saver, i had my project submission tomm.thx.