BGI Error:- Graphics not Initialized(Use Initgraph)

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2007
Posts: 2
Reputation: pvbhargav is an unknown quantity at this point 
Solved Threads: 0
pvbhargav pvbhargav is offline Offline
Newbie Poster

BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #1
Apr 21st, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #2
Apr 22nd, 2007
A wild stab in the dark suggests that you need to double up the second \ in your pathname, so

C:\\TC\\BGI

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.
http://www.catb.org/~esr/faqs/smart-...ons.html#prune
http://www.catb.org/~esr/faqs/smart-...html#writewell

> Its urgent.
http://www.catb.org/~esr/faqs/smart-...ns.html#urgent
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #3
Apr 22nd, 2007
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 2
Reputation: pvbhargav is an unknown quantity at this point 
Solved Threads: 0
pvbhargav pvbhargav is offline Offline
Newbie Poster

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #4
Jun 3rd, 2007
Hi all,

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

Thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 327
Reputation: Colin Mac is on a distinguished road 
Solved Threads: 22
Colin Mac Colin Mac is offline Offline
Posting Whiz

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #5
Jun 3rd, 2007
Go to c:\tc and make sure there is a folder named "BGI" and that the drivers are in it.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 3
Reputation: ashmew2 is an unknown quantity at this point 
Solved Threads: 0
ashmew2 ashmew2 is offline Offline
Newbie Poster

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #6
Sep 22nd, 2009
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

  1. int gd=DETECT,gm;
  2. initgraph(&gd,&gm,"C:\\TC\\BGI");
Obviously include the graphics.h.
If it still doesnt work , Press CTRL-F , then D.
(Dos Shell from the Compiler File Menu).
Write :

  1. C:\TC\BGI
  2. exit
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.
Last edited by ashmew2; Sep 22nd, 2009 at 3:27 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 90
Reputation: ajay.krish123 is an unknown quantity at this point 
Solved Threads: 8
ajay.krish123 ajay.krish123 is offline Offline
Junior Poster in Training

Re: BGI Error:- Graphics not Initialized(Use Initgraph)

 
0
  #7
Sep 22nd, 2009
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
  1. d:\\tc\\bgi
and also change the path in the compilers directory
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum


Views: 10959 | Replies: 6
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC