Unable to Open Include file: Fix Turbo C Error


Tip Abstraction:
        This tips fix the common error shows in Turbo C such that Unable to Open Include file

Unable to open include files 'STDIO.H'If you are a newbie in C / C++ programmer with Turbo C or you are using Turbo C in a new system, you may face many problems like converting small Turbo C window to larger in new Windows versions like Window 7.

These are some other errors you may face while using Turbo C/C++:
  • Linker Error: Unable to open file ‘C0S.OBJ’
  • Unable to open include file ‘STDIO.H’
  • Unable to open include file ‘CONIO.H’
  • Unable to open include file ‘IOSTREAM.H’ 
Here are the best solutions to above errors:

How to solve the errors: Unable to open include file ‘STDIO.H’, Unable to open include file ‘CONIO.H’ or Unable to open include file ‘IOSTREAM.H’

This error indicates, compiler can’t find or open the file ‘STDIO.H’ or ‘CONIO.H’ or ‘IOSTREAM.H’. Main reason of this error is the incorrect path to Turbo C header files. While you writing the code ‘STDIO.H’ or ‘CONIO.H’ or ‘IOSTREAM.H’, compiler will call that files, which is located with TC folder.Common location for header files is : C:/TC/INCLUDE
At first, you have to open above directory (or directory were you installed Tubo C) and ensure include files ‘STDIO.H’, ‘CONIO.H’ and ‘IOSTREAM.H’ are present in that directory (folder).
If you can’t find any one these, just remove and reinstall your Turbo C in C drive. 
If you can see all above include files, then you have to correct the path for ‘INCLUDE’ directories on your Turbo C compiler.
For that:
  • Open you Turbo C/C++.
  • Click on ‘Options’ from title bar.
  • From given list, open option for ‘Directories’.
Unable to open include files 'IOSTREAM.H'

Now a directories window will open.In this window, you can see the path for include directories.
Here you have to ensure the path for include directories and original (installed) path for include folder are same. Default path for INCLUDE folder is “C:/TC/INCLUDE”. But if you are installed Turbo C on another location or if you moved the installed TC folder to another, then you have two choices to correct the path. One is move your installed TC folder to you C drive without making a new folder(Cut – Paste the TC to C drive). Or change the path of include directory to path of your (original installed) INCLUDE folder.
 (Example: D:/Software/Turbo C/ TC/INCLUDE). Be ensure the INCLUDE folder contains all include files like ‘INCLUDE.H’, 'CONIO.H' etc.

Unable to open include files 'CONIO.H'

How to Solve Linker Error: Unable to open file ‘C0S.OBJ’

This error is also due to the incorrect path of Library Directories. Default path for library is “C:/TC/LIB”. But if you are not installed Turbo C on another location or if you moved the installed TC folder to another, then you have two choices to correct the path. One is move your installed TC folder to you C drive without making a new folder. Or change the path of library directory to path of your (installed) library folder (Example: D:/Software/Turbo C/ TC/LIB). Be ensure the LIb folder contains all library files like ‘C0S.OBJ’, ‘C0T.OBJ’ etc

Unable to open include files 'C0T.OBJ'

After correcting these changes on your computer or Turbo C, you can use your compiler as normal. If you are facing such problem after above proper solutions you may contact me...

Read: How to get Turbo C in Windows 7 and Window 8




18 comments:
  1. i changed i get error even after that what should i have to do any solution please ?

    ReplyDelete
  2. I am able to access header file inside C drive but not able to access those header files which are inside "Program Files" directory of C drive.

    ReplyDelete
  3. Just move those include directories to another drive and set directory location to new location and try again

    ReplyDelete
  4. Is it not possible to access include directories inside "Program Files"?
    as those file I am trying to access are immovable or rather moving them into another directory will interrupt the workflow of that program

    ReplyDelete
  5. Accessing to program files is possible. if you can't, that is due to the lack of permission.
    Control panel -> User accounts -> change user type -> change to administrator instead of standard user.

    ReplyDelete
  6. I have followed your steps but no avail..
    kindly suggest alternatives

    ReplyDelete
  7. What errors you get now? send me a screenshot to my mail (blog@infolet.org)

    ReplyDelete
  8. Error says: Unable to open or include file C:\Program Files\xxx.h

    ReplyDelete
  9. Uninstall Tc and install on another drive (not in C drive). Then if you still getting error after above steps, use Codeblocks software : www.codeblocks.org/downloads

    ReplyDelete
  10. after correcting the above error a get a message:Unable to open'<filename,EXE'

    ReplyDelete
  11. filename.exe is the program that your wrote. If you can't open:
    - Problem in compiling.
    - Turbo C error to make and open written program(try to make another simple program and try)
    -Due to permission problem; install in another drive or create program in another location than C drive
    -Due to virus

    I suggest to use Codeblocks IDE; easy and free( www.codeblocks.org/downloads)

    ReplyDelete
  12. the program is successfully compiled no errors but still its not displaying output??

    ReplyDelete
  13. it works alot...thanks now i can port my PC codes to old DOS...

    ReplyDelete
  14. i have corrected the directory files as well but it doesnot work... please help

    ReplyDelete