Turbo C graphics on Win7 [Updated]

Sorry, there seemed to be a problem in the tutorial described before.
There was a problem loading the includes file in turbo c which was due to directory mismatch in the turbo c installation.keeping the tc folder in a folder with name dosbox and mounting the folder dosbox as c: would fix the issue.The tutorial has been updated to fix the issue.
Sorry for any inconvenience caused.

Today I noticed that Win7 doesn’t support Turbo C graphics.

Win7 doesn’t support the fullscreen mode for DOS applications.

That was fine, just ignoring the error would start turbo c in window mode. But today when I tried running the program with graphics, the program compiled without any errors but on running the program displayed the same error and ignoring it didn’t do any good. Instead I get another error

So I tried changing some options on turbo c but all in vain.couldn’t make it work. And then I realized, DOSBox must be available for windows as well.(DOSBox is an DOS emulator. I had been using DOSBox to test my programs on turbo C on linux)

So the solution to this problem would be to install DOSBox on your win7. With DOSBox you can run turbo C on fullscreen mode as well. So download the latest DOSBox and start using Turbo C on fullscreen.

Setting Options on DOSBox:

In order to change the options of DOSBox, goto the DOSBox options menu in start menu.It will open the dosbox .conf file on notepad. The conf file is well documented. And there’s no need for much change.change the fullscreen valu from ‘false’ to ‘true’ if you want to run dosbox on fullscreen mode

You need to first mount the folder containing turbo c to be able to run it.
So on starting DOSBox type “mount c c:dosbox” assuming your turbo c installation files are at “c:dosboxtc”. Then change the current working drive from “z:>” to “c:>” by typing the command “c:” and next type “cd tcbin” and then “tc” to run the Turbo C. VOILA!! that’s it!!! your very own TC in fullscreen mode in Window 7

typing all these commands could be tedious and hard to remember to some of you.so we can autoexecute these commands.At the end of the conf file(i guess u know how to do it.but in case you forgot, open it from the DOSBox options menu from start menu). and at the end of the file under [autoexec] heading paste the following lines

mount c c:dosbox
cd tcbin
this would directly open Turbo C
If you have any problems please feel free to ask me. always happy to help ๐Ÿ™‚
P.S. if you use ‘gcc’ and want to be able to use graphics.h, you will need the library ‘libgraph’ installed.
This post describes very well how to do it.

15 responses to “Turbo C graphics on Win7 [Updated]”

  1. it not working….
    the error are come
    “invalid drive or directory”
    please give me solution that….

  2. i have installed DOSBOX but i m unable to run any graphics programs as it gives me error saying that “Unable to open include graphics.h “

    • really sorry for the late reply kalpana
      the error you mentioned is probably due to the ‘turbo c’ installation rather than with the dosbox.
      check if ‘graphics.h’ is present in the turbo c include directory

    • the error is in the Directory settings of TC…..

      Options-> Directories

      Change Include Directories to – ..INCLUDE

      and Library Directories to – ..LIB

  3. i was really confused how to make use of turboc to support graphics in windows 7. your detailed explanation here made me come out with comfortable answer. thanks a lot….:)
    i now installed dosbox and enjoying working with graphics in full screen mode.

  4. Thanks a lot! A very simple code it was! I added the coordinates of the car i had drawn previously to your coding and it was beautiful! Thank you!!

  5. sorry, posted wrong comment previously.

    Thanks a ton! the windows patch mentioned in the above comment worked fine!!

Leave a Reply

Your email address will not be published. Required fields are marked *