9

I am used to Turbo C++ and I am new to Ubuntu.

I really need Turbo C++ to get started.

Can somebody please help me to install Turbo C++ on Ubuntu.

1
  • 1
    Turbo c++ is a stone age ide+compiler, you can't create a modern os app using turbo c++, so try a modern c++ ide like codeblocks, qtcreator etc :)
    – Tachyons
    Oct 10, 2012 at 8:55

6 Answers 6

9

To run Turbo C++ in Ubuntu you must have the following:

A.Turbo C++ setup If you have the setup then excellent

B.DOSBox Emulator If you have it installed on your system the good but if you don't go to Ubuntu Software Center and search for DOSBox and install the emulator.

or using terminal:

sudo apt-get install dosbox

Now follow these steps...

1.Extract the rar file and you'll get a setup folder.

If you don't have unrar utility you just need to install small package called " unrar "

Step 1 : goto your Terminal then type

sudo apt-get install unrar

you can now extract your .RAR file by "right-click" then chose " extract here "

or via terminal

 unrar dosbox.rar

Move the extracted folder to your home folder

2.Open the DOSBox emulator

Write the following commands :

   1.mount c ~
   2.C:
   3.cd setup
   4.install.exe

3.The turbo C++ installation utility will appear.*Press Enter*.

Enter the source drive as C.Press Enter.

Change the source path to \setup if it isn't.Press Enter.

4.Select Start Installation and Press Enter.

The installer will install the files.Once finished u can delete the setup folder.

5.To run the Turbo C++ every time run the following commands:

   1.mount c ~
   2.C:
   3.cd tc\bin
   4.tc.exe

To enter into fullscreen mode press Alt+Enter and press it again for window mode.

source

0
4

The Borland Turbo C++ compiler is no longer available. On Linux, a C++ compiler is provided by the GNU Compiler Collection, which you can get by installing the 'build-essential' package. Many Ubuntu applications are actually written in C++.

You can edit your code with a simple editor (e.g. Gedit) and complile from the command line (command g++). Or you can install an IDE, of which there are many to choose from. I'm not a C programmer, but people seem to like Eclipse CDT (package 'eclipse-cdt').

If you have a body of Turbo C++ code that you want to reuse, it will probably be necessary to convert it. The Turbo C++ libraries may not be supported by GCC. I can't really help you there, but you can probably find help for specific cases on the Internet.

3

Although may be possible to use Turbo C++ in Linux i think you are best served with native linux tools. In Linux the most common C/C++ compiler is gcc/g++. A basic development setup can be achieved installing build-essential package.

If you need an IDE to write yours C/C++ programs you have many choices:

As i said unless you really need to use Turbo C++, give a try on those tools. You will have a much more modern development system with more features.

3

Turbo C++ installation with problem solving

I finally fixed my problem. I was trying to run "Turbo C++" in Ubuntu and I was facing a problem and then I solved it. Please read this to the end.

Installation

-Open "terminal".

  • Type sudo apt-get install dosbox to install DOSBox.

  • When it is installed download TC (download this Turbo C++), extract it, and paste it in home directory.

    enter image description here

  • Type dosbox in the terminal to open it.

  • Create a configuration file by typing this command in the DOSBox console.

    config -writeconf dosbox.conf
    

[Note: By default dosbox.conf file is created in the home directory.]

Write these commands in the DOSBox console.

mount c ~

or

mount c ~ /home/your_username/
c:
cd tc/bin
tc.exeortc

Now, when I tried "tc.exe". it was just getting closed/crashed and showing this in the terminal.

DOSBox switched to max cycles, because of the setting: cycles=auto.   
If the game runs too fast try a fixed cycles amount in DOSBox's options.

Exit to error: DRC64:Unhandled memory reference `

Fix Problem shown in terminal

I did this and everything is working fine:

  1. Open "dosbox.conf" present in your home folder.

    enter image description here

  2. Change things like this:

    core=normal
    cputype=normal
    cycles=normal
    

    enter image description here

or if you want you can try "simple" instead of "normal", but "normal" works fine.

This is it. Save and Exit "dosbox.confi" and then start your DOSBox again.

Auto-run Turbo C++

After fixing your problem. Whenever you open DOSBox. Every time you have to mount it and this is a big headache. For solving this follow this:

  • Open "dosbox.confi"

  • Go at the bottom and add these commands for your Turbo C++ auto-run in DOSBox.

    mount c ~ /home/prince
    c:
    cd tc
    cd bin
    tc
    

    enter image description here

and Save & Exit and now run and test it.

Full screen problem

That is all. It was not in fullscreen mode. That is why I changed this thing:

fullscreen=true
fulldouble=false
fullresolution=your computer resolution
windowresolution=your computer resolution
output=overlay
autolock=false

enter image description here

and for finding your computer resolution. Open the terminal and type this:

xdpyinfo | grep 'dimensions:'

enter image description here

7
  • btw your desktop icons in the last screenshot look horrible because they are too large. To fix this problem open Files, click the 3 parallel lines icon on the Files toolbar, and reset the Zoom to a smaller %. You should make the last screenshot again and re-upload it to your GitHub page after doing that.
    – karel
    May 4, 2018 at 8:31
  • Sorry dud. But my mom was getting angry on me because I was previously playing Clash Royal then Clash of Kings and then running computer from 2 hour. That is why I didn't get much time have a more answer May 6, 2018 at 17:59
  • But even though, Did my first post was helpful ??? May 6, 2018 at 18:01
  • 1
    I don't know anything about github. I just get a challenge from my school's computer teacher to run Turbo C++ using Dos box Emulator in Ubuntu and I did this all. I only know exploring internet and LOL. May 6, 2018 at 18:10
  • I've seen several of these kinds of answers and I liked all of them except for the ones where they used a phone to take screen photos instead of screenshots. As long as the answer looks OK, people will read it. Otherwise they will downvote it.
    – karel
    May 6, 2018 at 18:14
1

A very intuitive guide for installing Turbo c++ on Ubuntu system is here.

0

You can download Turbo C++ Compiler from the given link below.

http://www.4shared.com/zip/R96sJOwq/Turbo_C_for_Windows.html

To run this compiler you need Wine installed on your Ubuntu desktop/server.

Just install Wine and unpack the downloaded turbo compiler.

Double click the .exe file or right click and choose 'open with wine windows program loader'

The the file will ask to install, install the setup and search for 'turboc++' in unity.

Click and run the application, this will open the compiler in full screen mode.


To exit the compiler....

Select File>Quit (Alt+X)

That's all you will be back to the Ubuntu desktop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.