![]() |
|
#1
|
|||
|
|||
EGAVGA.bgi right in front of my computer's nose!Hello, I need help using graphics. I have Borland Turbo C++ 3.0 and whenever I try to use a graphics screen, I get the error, “Device driver file not found (EGAVGA.bgi).” The file egavga.big exists in the BGI folder, but the computer will not read it. I placed a copy of egavga.bgi into each of the zipped-up folders, but I still can not use graphics, even after I reinstalled the Turbo C++ 3.0. LOL, I also tried all of the different options under libraries etc. The directories section looked like it might be important in this puzzle, but I was unable to figure anything out. Finally, I tried using Google to investigate this problem, but could not come to a solution. Somehow, it seems that a mysterious program called “BGIOBJ.exe” residing in the BGI folder may be somehow connected to this strange problem in some way I do not understand; however, I am not too sure. I keep double-clicking on it but it just turns the screen black for a second. Maybe it is supposed to be triggered while the program is still running. Does anyone here know much about these sorts of things? Any help would be greatly appreciated!
|
|
#2
|
||||
|
||||
|
Are you using calls to registerbgidriver() and/or initgraph()?
It's really hard to tell what might be wrong with knowing what you're doing. __________________
Age is unimportant -- except in cheese |
|
#3
|
||||
|
||||
|
Quote:
i will be much easier to solve your problem if you can post the code |
|
#4
|
|||
|
|||
|
Thank you for your replies. Sorry, I should have included the code. I just copied examples from the Borland "Help" files, and nothing would work. Since everything had the same problem, I just thought that it must be that the file were not right, but I was probably wrong about that. Here is the program to demonstrate the rectangle function.
CPP / C++ / C Code:
I'm new to C++ so I am trying use examples to learn the language. I used to use Pascal, but I quit because got stuck with an error very similar to this when I got a newer computer. I thought it was because Pascal was too ancient of a language, so I switched to C++. .... Wow... I just figured this out myself again! I couldn't copy the program from the environment so I looked for it in its folder. But this was actually the installation folder. I could not find my file, so I used the Search. In this way I figured out that the real folder was under the C drive in the folder explorer. So I put the EGAVGA.bgi into the BIN folder, because I knew that that is where my program was, and now the graphics work! Sorry I didn't realize this earlier, but thank you for your help. Between Pascal and very recently C++ this problem has dooged me for years! .... Now I've tried to take the compiled 'exe' file out of its folder, and I got the same problem again. But a made a new folder and put a copy of the EXE in it along with a copy of EGAEVA.bgi, and now it works again. So this means that the files all have to be put in a file together to work! Thanks again for responding. Hopefully anyone who has this same problem (if anybody else is really that silly) will be helped by this post? Last edited by LuciWiz : 07-Nov-2006 at 01:13.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#5
|
||||
|
||||
|
It's been a while, but I looked at some of my older programs and I noticed I used:
CPP / C++ / C Code:
Another way I've used it is convert the .bgi file to a .obj file (there's a Borland utility to do that) and compile it directly into the program. Look at the help to see if this gets you anywhere. __________________
Age is unimportant -- except in cheese |
|
#6
|
||||
|
||||
|
change this line in your code:-
Quote:
with this one:- Quote:
where "c:\\tc\\bgi" is the pathname of your bgi-folder remember DO NOT use single back-slash in pathname you can replace the back-slash with a SINGLE forward slash |
|
#7
|
|||
|
|||
|
Thank you both very much. Doing that does work! My problem was that when I used "" it made the computer look into the BIN folder, I think. I had earlier tried replacing it with "C:\TP\BGI" but of course that did not work. Another entirely different way of solving this problem that I recently discovered was to just take the EGAVGA.bgi and put it right into the BIN file, but I'm glad that I now know the proper way to write a path! Thanks again! |
|
#8
|
||||
|
||||
|
Quote:
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Developing GUIs with wxPython (Part 3) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The