How to fix "unable to open stdio.h in Turbo C" error?

120,910

Solution 1

If you have problems like that, first of all your TC folder put in to the C:..drive. after completing installation open turbo c blue screen. there is a OPTIONS > Directories ..in that you can see for option to set up path..

  1. include directories..you can set path there now.. C:\TC\INCUDE
  2. libraries Directories..you can set path there...C:\TC\LIB
  3. if you want to store your output in BIN then you can set..C:\TC\BIN..otherwise you can set another path where you want to store your output..

Finally you can give OK and finished processes.. It will now work properly

Solution 2

Do this: Open your turboc2 folder you have tc.exe file inside, beside this file you find another file as named as ' tcinst.exe ' open it.

You will see the installation menu:

select as-- > Option > Directory > Include directory

Here you have to change the path of the directory to the path where your INCLUDE folder is located. Same way change the path to library directory also over restart your tc.exe.

Solution 3

Check if you have anything like those stdio.h file and other header files under INCLUDE folder and LIB folder. LIB contains some files. In my case, I had the same issue but both of these folder were blank.. good to know. Steps:

  1. Press: ALT + O + D (i.e. press ATL (keep pressed) and then O english character) and then D).
  2. You'll see a popup window.
  3. This window will have values for INCLUDE and LIB directories. The by default value for these two boxes in the popup window are: Drive leter where you installed TC... i.e. C:\ or D:\ or whatever followed by the path for INCLUDE and LIB folder. So, in my case,

    INCLUDE box was set to: "C:\TC\INCLUDE" and LIB directory value box was set to: "C:\TC\LIB" (without quotes). Steps to resolve:

  4. Press ALT + C.

  5. Set your current directory as C:\TC\BGI
  6. Press ALT + O + D, and put ../INCLUDE and ../LIB in Include/Lib directory values.
  7. and now... when you'll run your progress, you'll say thanks to me. I like the archduchess C fractal graphics that I'm running on DOS Turbo C right now. Lol.

Solution 4

Go to OPTIONS tab then select directories option then enter the particular path where your turbo c folder exists.

Enter the path in all the four message boxes and it would start working like it did in my case. I have TurboC3 and all the files were together in one common root folder.

Solution 5

Check your environment include path. The file is not in the locations pointed by that environment variable.

Share:
120,910
Admin
Author by

Admin

Updated on July 05, 2022

Comments

  • Admin
    Admin almost 2 years

    Whenever I compile my program, I get the error above.