Does we need turbo c software to run turbo c exe file?
Hmmm sounds wierd! I wrote a program called chart.c in turbo c which is two header files like bimap.h ,xyz.h.When I compile,chart.exe is created.when i run chart.exe in some other machine, its not running unless tc sofware and those two header files is placed in the system.Can anyone tell me why it happens and how to make one single exe file without all these headerfiles and tc sofware.

Thanks in advance

Why use Turbo C? Try downloading Dev-C++, Code::Blocks, or if you're into the command line, gcc.

Does we need turbo c software to run turbo c exe file?
Hmmm sounds wierd! I wrote a program called chart.c in turbo c which is two header files like bimap.h ,xyz.h.When I compile,chart.exe is created.when i run chart.exe in some other machine, its not running unless tc sofware and those two header files is placed in the system.Can anyone tell me why it happens and how to make one single exe file without all these headerfiles and tc sofware.

No, you don't have to have the source code files on the machine. The .EXE is all you should need.
What happens when you try to run it? Without the "what happens" there is no way we can figure out the "why".

Why use Turbo C? Try downloading Dev-C++, Code::Blocks, or if you're into the command line, gcc.

No need to suggest a new compiler. Turbo C works just fine. It isn't broken just because it's old.

Why use Turbo C? Try downloading Dev-C++, Code::Blocks, or if you're into the command line, gcc.

Agreed.
Better move on with the times rather than being left behind. When using Turbo C, beginners keep getting weird ideas about how to clear the screnn, checking for key hits, using the useless inbuilt graphic library.
Using modern optimizing compilers keep you from using non standard funcitons in your program.

Do a reality check ? Want graphics in your program to make a game, use third party graphics engine ? Want GUI ? Use GTK+.
There always is a better alternative if you have open ideas about it.

Also TurboC programs quickly run out of memory which makes it a poor compiler for all but the simplest graphics programs. And that was the major reason why Mkcrosoft abandoned MS-DOS operating system.

And as a final reason, it's no longer being updated. While Dev-C++ IDE isn't either, you can download MinGW patches for it.

And as a final reason, it's no longer being updated. While Dev-C++ IDE isn't either, you can download MinGW patches for it.


Tubo Tols is back!
Borland released a new version just a couple months ago, but I don't know what its like.

Guyz,thanks for all the replies.I have done a complete program(generating growtchart-taking image and plotting on the image from coordinates in a notepad file).Now i cannot change the the complete code to .cpp.Now the problem with my program is that i have two header files bitmap.h (to open the image) and some other .h file.When i put my exe in some other machine, i have to copy two header files and tc folder to that machine and then run my exe file.How to overcome this problem?

did you read WaltP's comments ? Please answer his questions instead of just repeating the peoblem.

I will shorten my problem.Now the problem is when i copy the exe file to some other machine, its not running without TC folder.I mean to say Once i copy the tc folder to the machine the exe is running without any problem.Without TC folder when i run the exe file, the image is not getting displayed.
My program:
It gives the user a browse dialog box where the user selects text file from which the x and y coordinates is fetched to plot on a chart image(opened using bitmap.h).Now if TC folder is not there, the user is prompted with dialog box once it is selected image is not getting displayed i mean the chart.

Hope it is understood

Finally I found out a reason for above problem i.e

initgraph(&graphdriver,&graphmode,"c:\\tc\\bgi");

so when the exe file runs on the other system it will look for bgi folder in c drive ie in that system also tc folder should be placed so that it can take and initialize the graph.can we over come this problem by without giving the path, i tried with "" also instead of path but it didnt turn up

please let me know if anybody arrives at the solutions

Thanks in advance

NEVER hardcode a path anywhere in your application.
If you use the BGI (which stands for Borland Graphics Interface btw) you will need the BGI files of course, which are the graphics drivers for that system.
You do NOT need to have TC itself installed anywhere except on your own machine, nor the source for your application, just the BGI files.

But as others asked, why are you sticking to a 20 year old compiler?

you are right, see the example here

used to work with Turbo Pascal 15 years ago, actually wrote my own BGI driver once...

Is it that way that we have to just pass the bgi files and my exe file to the other machine, in order to make the exe to work.Iam just trying to minimise it.I tried installdriver,registerdriver but not able to get he solution.Is there any way that our program itself initialize the graph such that not necessary to give the path or to send bgi files to the other machine.

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.