0

I tried installing Turbo C++ in Ubuntu after going through step by step process in DOS BOX, but it shows an error which states that

Unable to change to: setup

setup is the name I've given to the unzipped folder. I've also attached a screenshot of both the DOSBOX and the folder /home where the Setup file is located.

enter image description here

pomsky
  • 68,507

1 Answers1

2

The cd setup command needs to be run from the user's Home directory where the setup directory is located, not from the C: drive in DOSBox, otherwise DOSBox will not be able to find it.

The setup directory can be mounted in DOSBox as follows:

Z:\>mount C: /home/rajat/setup
Drive C is mounted as local directory /home/rajat/setup

where Z:\> is the DOSBox prompt and mount C: /home/rajat/setup is the command to mount the setup directory in rajat's Home directory in DOSBox. This command returns a message that says Drive C is mounted as local directory /home/rajat/setup.

To list the contents of the setup directory type C: to change directories to the new C: directory and press Enter. Then type dir, the DOS equivalent of the ls command in Linux, and press Enter to list the contents of the setup directory.

DOSBox is different from Linux in the way that it gives its own names to files and directories, so it is convenient to type only the first few letters of the file or directory's name and then press Tab to autocomplete the name in DOSBox.


Turbo C++ is very old; some say it's obsolete. The modern alternative to Turbo C++ in Ubuntu is g++ which can be installed with sudo apt install g++ and IDEs for C++ in the default Ubuntu repositories are codeblocks and codelite.

karel
  • 114,770
  • Hi Karel, I didn't know that it's not the right place to ask this question. Although, I did what you said and still I get the same message displaying that : Unable to change to : setup I'm new on Ubuntu so if you could give me detailed commands I would be very thankful to you. – Rajat malik Nov 06 '19 at 06:01
  • Detailed commands to change directories to setup is to mount rajat directory as the new C: directory with mount C: /home/rajat/ and then change directories to setup directory with cd setup. It's the same command as in the answer except that I'm also showing you how the cd command works in DOSBox. – karel Nov 06 '19 at 06:05
  • Unable to change to : setup – Rajat malik Nov 06 '19 at 06:11
  • I think I know what you did wrong. DOSBox uses its own names for files and directories, which are not the same names that Ubuntu uses. You can list all the names of directories in the current directory with the dir command. Then type the first 3-5 letters of the new directory and press the Tab key and DOSBox will autocomplete the command with what it thinks is the correct directory name according to DOS standards. Thank you Microsoft for making every simple file operation agonizingly complicated except in Windows. – karel Nov 06 '19 at 06:15
  • Thank you very much, Karel. It started. But now, the Turbo C++ asks for: [ Enter the path to the directory containing the C++ files and as I type "/home/rajat/setup" it says that it's not valid. – Rajat malik Nov 06 '19 at 07:10
  • The error message says that it can't find the directory containing the C++ files in setup, so try to find the C++ files manually in Files file manager application. They must be located somewhere if you downloaded them. Once you find where they are located you can either use cd to change directories to the directory that contains the C++ files or else cut/paste the C++ files into the setup directory. – karel Nov 06 '19 at 07:34
  • Each and every file is already in the 'SETUP' folder which is located in \home\rajat\setup but still the setup of TurboC++ can't find the files. – Rajat malik Nov 07 '19 at 14:06
  • 1
    It's done. I removed the DOSBOX and then installed it through the 'Terminal' and then finally it's working now. Thank you very much. – Rajat malik Nov 08 '19 at 10:18