Saturday, December 20, 2008

Install Borland Turbo C++ in Ubuntu

Normally in India majority of schools and colleges have Turbo C/C++ as the default IDE. Most students are younger than the Turbo C/C++ compiler they use at colleges. I checked our college's Turbo C++ and it was made in 1993. Back then George Bush Sr. was the president of the USA and Windows 95 was still 2 yrs away.
I tried using Turbo C in Vista but I couldn't use it in maximized state. Then I  tried Wine but it didn't work, I wondered why, but then someone suggested this amazing piece of software called DOSBOX which helps run software made for your dad when he was young and had long hair.
Go to the terminal:
sudo aptitude install dosbox
APT will now download and install DOSBOX.
You can also use Synaptic as usual.
Download Turbo C/C++ here
You have to register, but they don't nag and it is hasslefree.

Unpack the achieve

Keep the installation files inside a folder of your home directory named "setup".
Open up dosbox, its under Applications > Games
Type in :
Code:
mount c ~
c:
cd setup
install.exe
This will start the setup of Turbo C.

[Image]


After setup is finished , do this:
Code:
c:
cd TC\bin
tc.exe 

[Image]

Now everytime you want to run Turbo C++ start DOSBOX and then type in the following:
Code:
mount C ~
c:
cd TC\bin 
tc.exe

To maximise full screen hit 'Alt+Enter' and to go back to medium size again hit 'Alt+Enter'. DOSBOX has a habit of capturing the mouse pointer, once you click within DOSBOX you cannot move it away from the winow. To go back to Ubuntu hit 'Alt+Enter' twice.
'Alt+X' will close Turbo C.
Hope I have helped :)

55 comments:

  1. Wow man, you saved my life. :)
    Thank you.

    ReplyDelete
  2. well he literally killed you.
    turboC is severely non-standard, look around the web dude

    with linux comes the finest of all compilers, use gcc
    or use devC++ or any modern ones in windows

    ReplyDelete
  3. @ Sujoy the Enlightened One!
    Please read the article carefully. In India Turbo C is unfortunately the default compiler. If you use anything except it you will be failed!
    I do not recommend it but since it is a necessity for schools and colleges, I have provided a method to use it in Ubuntu.

    ReplyDelete
  4. @anomit
    You can read more lol stuff like that on my college blog here:
    http://vartakblogs.blogspot.com

    ReplyDelete
  5. please provide me the link where you downloaded
    turbo c/c++.....it would be really helpful

    ReplyDelete
  6. @ajay
    http://cc.codegear.com/item/26014

    ReplyDelete
  7. dude no use of devC for assembly and gcc sux u know
    use 32bit version of TC

    ReplyDelete
  8. Hi,
    Is there a way to use borland in linux wiht the ide as we can make better college projects with that.

    I agree even my college says you must use turbo c or borland no gcc or any other compiler.

    Cheers,
    Vishal

    ReplyDelete
  9. Thanks a lot......
    but there's a problem
    its unable to include the header files
    how do i solve that??

    ReplyDelete
  10. Hi i was working with turbo c and i found something interesting:-
    http://www.codeblocks.org/downloads/5#linux64
    Now linux is fun ;)

    ReplyDelete
  11. Shobit mount your linux folder containing tc as c:

    dosbox
    Z:\>mount c ~/Desktop/
    c:cd tc/bin/tc.exe
    you are done.

    ReplyDelete
  12. we are not generally allowed to use gcc because of minute differences in source code we write.
    eg-void main() //not acceptable by gcc
    only "int main(void)"

    ReplyDelete
  13. install.exe command is not working!! plz help

    ReplyDelete
  14. i created a new directory inside my c: called setup then typed in the install.exe command but the response is illegal command :install.exe

    ReplyDelete
  15. @harini
    Did you do this step:
    mount c ~
    c:
    cd setup
    install.exe
    ??
    do all the steps once again, don't miss any

    ReplyDelete
  16. im using a ubuntu 9.04 if that helps and dosbox did get installed with the command apt-get install dosbox

    ReplyDelete
  17. itz working fine till cd setup

    but the install.exe is giving an error saying
    illegal command :install.exe

    ReplyDelete
  18. Go to your Home directory and create a folder setup and keep the extracted files there.
    Then open DosBox and perform the otehr steps

    ReplyDelete
  19. it got extracted as a package!! where do i find the extracted files??there weren any...

    ReplyDelete
  20. it got downloaded as a package...there weren any files for extraction anywhere

    ReplyDelete
  21. paste the zip file you downloaded in your home directory and right click it and then select extract files.
    change the folder name to setup

    ReplyDelete
  22. no no there weren any zip files at al !!! i gave in the command apt-get install dosbox
    it downloaded the package and opened the dosbox emulator terminal directly !! :(
    i found it on application>games as well...

    ReplyDelete
  23. Download the turbo c compiler here:
    http://cc.codegear.com/item/26014
    extract the zip files in home directory in a folder called setup

    ReplyDelete
  24. it was available on this page n i tried it out as well..
    i went through the procedure filled the form etc but itz saying im not an authorized user

    is there any way u can mail the zip files to me ?? im sorry but if u can help otherwise it would be nice too !!thanks

    ReplyDelete
  25. hey i got c installed in my system as per ur instructions i m able t complile it but its not runnin....d whole screen vanishes as soon as i press ctrl+f9...dono y ...

    ReplyDelete
  26. are you people crazy? Turbo C on Linux? seriously what the fuck is wrong with you? Turbo C is the biggest piece of shit ever.

    tell your instructors who insist on Turbo C to fuck off. Use CodeBlocks or any other free standard C compiler. make your code standard C, and it will be able to be compiled in their crap Turbo.

    i dont know what is wrong with India, that all your colleges insist on Turbo C. the admins, must be getting bribes and kickbacks from Borland, that's got to be the only excuse.

    or maybe its a larger conspiracy to keep you people hopelessly incompetent, so that the only jobs you'll take from the West are our call centers and tech support?

    ReplyDelete
  27. Hey thanks dude....
    U realy helped me.I too need this..

    But i'm facing a problem.I'm nt able to get the header files.So program is not compiling.How to clearly set the path,u hav to tell me...
    I'm nt able to munt as per the instructions above this page.
    The error i'm getting is "You are still on drive Z:,change to a mounted drive with C:."
    and also "Usage MOUNT Drive-Letter Local-Directory"
    How to fix.. Help me.

    Moreover i'm ashamed by this comment.

    _________________________________________________
    "November 24, 2009 2:00 AM
    JoeSchmoe said...
    are you people crazy? Turbo C on Linux? seriously what the fuck is wrong with you? Turbo C is the biggest piece of shit ever.

    tell your instructors who insist on Turbo C to fuck off. Use CodeBlocks or any other free standard C compiler. make your code standard C, and it will be able to be compiled in their crap Turbo.

    i dont know what is wrong with India, that all your colleges insist on Turbo C. the admins, must be getting bribes and kickbacks from Borland, that's got to be the only excuse.

    or maybe its a larger conspiracy to keep you people hopelessly incompetent, so that the only jobs you'll take from the West are our call centers and tech support?"
    _________________________________________________

    Can we do something to create some attention. Here education sucks. Illiterate idiots still rules our educational upper circles. can we make any difference. A movement for good.

    ReplyDelete
  28. Good work, thanks you vary mach.

    ReplyDelete
  29. in ubuntu dosbox while working in compiler the arrow keys are not working we have to use mouse & backspace button to edit the program in c & c++ please tell me the solution on my email id : rajesh_gos@rediffmail.com

    ReplyDelete
  30. HI!!!
    I TRIED THE METHOD...
    ITS GREAT...
    BUT I HAVE TWO PROBLEMS
    1. THAT THAT TC 1.01 IS THE "C" BUT NOT C++
    2. IF I INSTALL TURBO C++ 3.0 THIS METHOD,IT INTALLS,BUT AT COMPILATION OF THE PROGRAM,IT DOESN'T INCLUDES THE HEADER FILES

    ReplyDelete
  31. thanx dude.. i got it........
    by R.A.J

    ReplyDelete
  32. at DOSBOX it gives an error
    "directory c: doesnt exist""
    plzzz help....

    ReplyDelete
  33. i can not download turbo c++ please get a easy link,me from bangladesh

    ReplyDelete
  34. HI
    Thanks for great tutorial!
    I have TurboC++1.01 installed on DOSBox in Ubuntu10.04 LTSLLynx now (dl from http://www.uv.tietgen.dk/staff/mlha/download/dos/). I haven't tried it yet but am sure it will work!?

    I agree with JoeSchmoe about the need for TC though but I do not know how to avoid the need for graphics.h in those C/C++ programs using BGI TC? I am going to look into getting this sorted so I can do graphics coding in C/C++ with gcc & g++ without DOSBox.

    But for now I can at least use C/C++ turboC code in Ubuntu with DosBox.

    Thanks for your help

    ReplyDelete
  35. for turbo c ++ v3.00 install a free way visit sohel4s.blogspot.com

    ReplyDelete
  36. Thanks, this really is helpful.

    Another tips:
    Since DOSBox works almost like Command Prompt, after the Turbo C++ installed it can also be run by only typing:

    c:\tc\bin\tc.exe

    ReplyDelete
  37. wowww...helped me alot...
    really thanks..
    but
    when i maximised the window, it doesn't looked really good.

    anyway thanks again.i tried many tips but this was the one tht is actually working..

    ReplyDelete
  38. THANKS A MILLION BUDDY.... YOU SAVED MY WORK.

    ReplyDelete
  39. hi,
    i am new in c,plz help me to install turbo c in linux.

    ReplyDelete
  40. I wish I could have "Liked" your post. You really made me laugh at the initial stage.

    ReplyDelete
  41. hi friends ...
    i am using ubunutu 10.10.
    and there is no windows in my laptop.
    i don't want to use gcc because it does not contain header files like conio.h.
    can anyone help how to get turbo c in my ubntu . i have downloaded dosbox and wine.
    thanks in advance...................

    ReplyDelete
  42. dude i cannot download tat file frm de link which u gave..it says im not authorized...i registerd ter but still its saying de same..can u plz help me...i need it badly..

    ReplyDelete
  43. How to run grpahics.h programs????

    ReplyDelete
  44. I'm in the same situation here in Argentina. I can not believe that is still taught in this way. Also, all the computers in the lab run windows 98!!! Why!!!!
    But anyway, thank you for the info.

    ReplyDelete
  45. is there any .jar file of Turbo C++. For specially java based phones.

    ReplyDelete
  46. so we can make programs via mobile.?so we can make programs via mobile.?

    ReplyDelete
  47. That's exactly what I was looking for. Here in Male' we've got Indian Teacher, teaching Indian Methods on this piece of software. I use Uberstudent and nothing else. Now finally I can finish my assignment :D Thanks

    ReplyDelete

Related Content

Related Posts with Thumbnails