TechBuzzPro

How to Install Turbo C on Windows (Step-by-Step)

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Turbo C is a 16-bit MS-DOS compiler that does not run natively on modern 64-bit Windows. To install it, you run it inside a DOS emulator such as DOSBox: download a clean Turbo C package, install DOSBox, mount the Turbo C folder as a virtual drive, and start the compiler from the DOS prompt. This guide walks through that process using only official or widely trusted sources, and explains what to do when the setup does not behave.

What You'll Need

  • A Windows PC (Windows 7, 8, 10, or 11). The steps below assume 64-bit Windows, where 16-bit programs cannot run directly.
  • DOSBox, the free DOS emulator, from its official site (dosbox.com).
  • A Turbo C package. Use a reputable archive that includes TC.EXE and the BGI graphics files. Avoid modified or cracked builds; if you cannot verify the source, use an alternative compiler instead.
  • About 50 MB of free disk space and a folder path with no spaces, such as C:\TC.

Step-by-Step

  1. Create a clean folder for Turbo C. Open File Explorer and create C:\TC. Extract the Turbo C package into that folder so that TC.EXE sits directly inside C:\TC (or inside a single subfolder such as C:\TC\BIN). Note the exact path; you will type it in DOSBox.
  2. Install DOSBox. Download the installer from dosbox.com and run it. Accept the default install location. When it finishes, launch DOSBox once to confirm a window opens with a Z:\> prompt.
  3. Mount your Turbo C folder. In the DOSBox window, type mount c c:\tc and press Enter. This makes C:\TC appear as drive C: inside DOSBox. Then type c: and press Enter to switch to that drive.
  4. Start Turbo C. Type tc and press Enter. If TC.EXE is in a subfolder, type cd bin first, then tc. The blue Turbo C IDE should appear.
  5. Set the include and library paths. In Turbo C, open the Options menu and choose Directories. Set Include directories to the folder containing the .H files (usually C:\TC\INCLUDE) and Library directories to the folder containing the .LIB files (usually C:\TC\LIB). Set the Output directory to a folder you can write to, such as C:\TC\OUTPUT. Press Enter to save each field, then choose Options > Save options so the settings persist.
  6. Write and compile a test program. Press Alt+F3 to close the editor if needed, then open File > New. Type a short program such as #include <stdio.h> followed by int main(void){printf("Hello");return 0;}. Press F2 to save it as HELLO.C, then press Alt+F9 to compile. If the compiler reports no errors, press Ctrl+F9 to run it. A console window should show the output.
  7. Make startup easier. Close DOSBox. Open the DOSBox configuration file (usually dosbox.conf in the install folder or in %LOCALAPPDATA%\DOSBox). At the bottom, under [autoexec], add the same mount and drive commands: mount c c:\tc, c:, and optionally cd bin and tc. Save the file. The next time you open DOSBox, Turbo C will start automatically.

Common Mistakes

  • Mounting the wrong folder. If you mount C:\TC but TC.EXE is inside C:\TC\BIN, typing tc at the root will fail. Check where TC.EXE actually sits before mounting.
  • Using a path with spaces. DOSBox mount commands are easier to get right when the host folder has no spaces. Move the folder to C:\TC rather than C:\Program Files\Turbo C.
  • Forgetting to save options. Directory settings in Turbo C are not permanent until you use Options > Save options. Without that, the compiler may not find its header files on the next launch.
  • Expecting a native Windows install. There is no official 64-bit Turbo C installer. Running TC.EXE directly from Windows Explorer will not work on modern systems; it must run inside DOSBox or another DOS emulator.
  • Editing the wrong configuration file. DOSBox may read a per-user config instead of the one in the install folder. If your autoexec commands do not run, check which config file DOSBox is actually loading.

Tips

  • Keep the Turbo C folder in a simple location such as C:\TC. Short paths reduce typing and avoid mount errors.
  • Use Alt+Enter inside DOSBox to toggle full screen, which makes the Turbo C editor easier to read.
  • Save your .C files inside the mounted folder (for example C:\TC\OUTPUT) so they are visible in Windows Explorer as well as in DOSBox.
  • If you only need to learn C syntax, consider a modern compiler such as GCC or an online compiler. Turbo C is useful for legacy coursework, but it is old and does not support modern C standards.

Troubleshooting

If DOSBox opens but tc is not recognized, the drive is mounted to the wrong folder or TC.EXE is in a subfolder. Type dir at the C: prompt to list the contents and confirm where TC.EXE is. If the Turbo C IDE opens but compilation fails with missing header errors, recheck Options > Directories and confirm the INCLUDE and LIB paths point to real folders inside the mounted drive. If the program compiles but produces no output, run it with Ctrl+F9 and then switch to the output screen with Alt+F5; Turbo C does not always return to the editor automatically. If DOSBox will not start at all, reinstall it from the official site and launch it without a custom configuration to isolate the problem. If your antivirus flags the Turbo C package, delete it and obtain a clean copy from a trusted archive; do not disable antivirus protection to force it to run.

Frequently Asked Questions

Can I install Turbo C directly on Windows 10 or 11?

No. Turbo C is a 16-bit DOS program and 64-bit Windows cannot run it natively. You need a DOS emulator such as DOSBox.

Is Turbo C still available officially?

Turbo C is legacy software and is not distributed as a current official product. Use a trusted archive, or choose a modern compiler if your course does not require Turbo C specifically.

Why does Turbo C say it cannot find STDIO.H?

The include directory is not set correctly. Open Options > Directories and point Include directories to the folder that contains the .H files, then save the options.

Can I run Turbo C without DOSBox?

Only on a 32-bit Windows installation or a real DOS environment. On 64-bit Windows, DOSBox or another DOS emulator is required.

How do I exit Turbo C?

Use File > Quit or press Alt+X. To close DOSBox entirely, type exit at the DOS prompt.