0

I have installed Turbo c++ in my Kali Linux Os using Dosbox emulator and I'm unable to compile my codes because there's an error Unable to find iostream.h include file I tried changing path in TurboC.Cfg still no luck Any solutions please and it's for education purpose I don't want to use other software's like gcc

amritanshu
  • 777
  • 13
  • 25
Shree Har
  • 25
  • 3
  • 7
    I strongly question the education purposes that require you to run extremely aged software, in a Dos emulator on a Linux box. – StoryTeller - Unslander Monica Dec 10 '17 at 10:10
  • Possible duplicate of (https://stackoverflow.com/questions/2356687/how-to-fix-unable-to-open-stdio-h-in-turbo-c-error). See also, perhaps, (http://www.infolet.org/2013/08/solving-unable-to-open-include-file-stdio.h-conio.h-iostream.h-c0s.obj.html). – Cheers and hth. - Alf Dec 10 '17 at 10:15
  • @Storyteller well it's for studies in college we are taught in Turbo c++ in a windows vista os I agree our education system is outdated but for exam sake I got to stick to the old standard Turbo c++ – Shree Har Dec 10 '17 at 10:18
  • @ShreeHar - Well, as it were, if your institute requires a windows box, you'd be better off following suit. At least then you'd be able to get support from your instructors. If you want to create your own setup, you need to know what you are doing. For instance, did you install the compiler from inside dosbox itself? Or did you install it into the host OS? – StoryTeller - Unslander Monica Dec 10 '17 at 10:32
  • @StoryTeller I think it's a fair requirement, the OP has a free compiler on linux yet he has to compile stuff in turbo C++ because that's what he is supposed to write his assignment/exams in. When I was studying this was solved by having a bootable floppy with DOS and the toolchain on it. – amritanshu Dec 11 '17 at 08:25
  • Don't use TurboC++ (an obsolete implementation of a non-standard obsolete dialect of C++). Try to convince your teachers to switch to some free software C++11 compatible compiler (e.g. on any recent Linux distribution) – Basile Starynkevitch Dec 11 '17 at 08:29

1 Answers1

1

You are probably just misconfigured paths or incorrectly run the TC.exe.

If you unpacked the TurboC++ to e.g. ~/dos/TC/, it should be enough to start dosbox and execute something like this:

mount C ~/dos/TC/
cd C:\TC
BIN\TC.EXE

Then go to Directories configuration and make sure that Include and Lib paths are default: C:\TC\INCLUDE & C:\TC\LIB. Note, if you've edited the conffigs from linux, make sure they still have DOS-style "\r\n" line ending.

You may save the commands above to a *.bat if you want to run them at once.

Fat-Zer
  • 337
  • 2
  • 12