hi anyone can help me. My problem is when i compile my graphic program using turbo or borland c it does not show any error nor any output the screen show blank.
my computer configuration is


dual core processor AMD
MSI K9n moter board
sata hardisk
N-VIDIA geforce chip set

please help me for solving my problem. I'm absolutly frustrated now.

Recommended Answers

All 15 Replies

>>please help me for solving my problem. I'm absolutly frustrated now
Not possible if you don't post the code.

I don't know the borland c graphics api and don't recommend to use it, as it's just a commercial library, not standard, not open source and not cross-platform, not very good either. No one agrees with gtk seemingly, but then at least use opengl, or even sdl. But why the screen is blank, i can tell you what i know from other graphics api-s. Look at the initialization for graphics, it has to be done strictly right, and exactly in the right order. There, the next functions often use the data from the previous initialization functions, and if you use them before these functions, they cannot obtain proper data, because this data would be created as a result of certain initialization, and the result is that certain surface would never be drawable, which usually results in the black or gray screen. Unfortunately the compiler cannot give any errors or warnings about that, because graphics is done by functions and not by language constructs. The api cannot warn you either if you run it only in window. Only when you run the program from console, then the graphics api usually writes errors in the console, that a certain surface is not drawable or such.

Did you initialize the Borland graphics library ? I don't know the call but I think there is a function that must be called before any of the other graphics functions.

Member Avatar for GreenDay2001

Its initgraph. Also the third argument must contain right path to the directory where BGI files are stored.

i have called it its not a problem of graphic class call because the same program work on other system. without have any problem

I have written my program in a proper order i confident because the same program is working on other system and giving me a display what i want.

I don't know the borland c graphics api and don't recommend to use it, as it's just a commercial library, not standard, not open source and not cross-platform, not very good either. No one agrees with gtk seemingly, but then at least use opengl, or even sdl. But why the screen is blank, i can tell you what i know from other graphics api-s. Look at the initialization for graphics, it has to be done strictly right, and exactly in the right order. There, the next functions often use the data from the previous initialization functions, and if you use them before these functions, they cannot obtain proper data, because this data would be created as a result of certain initialization, and the result is that certain surface would never be drawable, which usually results in the black or gray screen. Unfortunately the compiler cannot give any errors or warnings about that, because graphics is done by functions and not by language constructs. The api cannot warn you either if you run it only in window. Only when you run the program from console, then the graphics api usually writes errors in the console, that a certain surface is not drawable or such.

Thanx giving me response, but, its not a problem of graphic class call. I have written my program in a proper order i confident because the same program is working on other system and giving me a display what i want.

The code maybe the same as the code used in the program that works on the other system, but if the bgi files are in a different location on both systems, it won't run on both.

Did you physically check that the graphics drivers are in the location specified in initgraph on the system the program won't run on?

The code maybe the same as the code used in the program that works on the other system, but if the bgi files are in a different location on both systems, it won't run on both.

Did you physically check that the graphics drivers are in the location specified in initgraph on the system the program won't run on?

yes, bgi files are at the same place where it should be. I dont know how the check the graphics driers in initgraph can You please help me for checking my problem

Sorry, bgi files = graphics drivers. If they're in the right place, then I'm not sure after that.

post a few lines of code that appear before and after the initgraph() function call. Maybe there is something about the parameters you passed that is not compatible with the computer(s) that are failing to run your program.

There should be some examples in borland c, try to compile one graphics example and see whether it works. Then you know whether the problem is in your code, or in your installation of the compiler. Don't become desperate and think patiently what the problem may be, there is no mystery, all the things in programming can be found out by one testing or another, most often a very simple testing. You may also try to reinstall the compiler, as this is always simpler than finding mistakes in the installation.

There should be some examples in borland c, try to compile one graphics example and see whether it works. Then you know whether the problem is in your code, or in your installation of the compiler. Don't become desperate and think patiently what the problem may be, there is no mystery, all the things in programming can be found out by one testing or another, most often a very simple testing. You may also try to reinstall the compiler, as this is always simpler than finding mistakes in the installation.

I have already tried the way of testing but unable to find out i think this is problem of the Nvidia chipset or dual core processor. So if You have any idea of this core or chip set then update me or from where i can get it the information

Why would any of your modern kit even care about your 20 year old fossil compiler?

It only runs on your machine because it is being emulated. At some point, it will break and I guess you've found one of those.
For example, it will know nothing of long filenames, or filenames with spaces or FAT32/NTFS file systems.
It probably makes a mess of any Y2K issues (remember that?).
No matter how much real memory you have (Gigabytes probably), it will only allow you access to 640K max, and even then it will be limited to 64K blocks at a time.

"Hello, I've got this piece of paper for writing on, but it seems incompatible with the stone chisel I've been writing with in the past".

Get a compiler for this millennium and leave turboc to the compu-archaeologists.

Perhaps start with
http://en.wikipedia.org/wiki/Dev-C%2B%2B
http://www.bloodshed.net/

Then use the devpak feature to get this simple graphics library, LibSDL
http://www.libsdl.org/

The sad thing is, where I'm from, college is just starting up again and I bet they'll be teaching C using the same Turbo C compiler again this year.

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.