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

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

+6
c header-files compiler-errors turbo-c
source share
11 answers

If you have problems, first of all, your TC folder, placed on the C drive: ... after the installation of open turbo c blue screen is complete. there is OPTIONS > Directories .. which you can see for the option to configure the path.

  • include directories .. you can set the path there now. C:\TC\INCUDE
  • Libraries Directories .. you can set the path there ... C:\TC\LIB
  • if you want to save your output to BIN, then you can set .. C:\TC\BIN .. otherwise you can set another path where you want to save your output.

Finally, you can give OK and finished processes .. Now it will work fine

+10
source share

Do this: open your turboc2 folder, you have the tc.exe file inside, next to this file you will find another file called "tcinst.exe" to open it.

You will see the installation menu:

 select as-- > Option > Directory > Include directory 

Here you must change the directory path to the path where the INCLUDE folder is located. In the same way, change the path to the library directory and restart tc.exe.

+5
source share

Check if you have something like the stdio.h file and other header files in the INCLUDE folder and the LIB folder. LIB contains some files. In my case, I had the same problem, but both of these folders were empty. Good to know. Steps:

  • Press: ALT + O + D (i.e., press ATL (hold down) and then O the English character) and then D).
  • You will see a popup.
  • This window will have values ​​for the INCLUDE and LIB directories. The default value for these two fields in the pop-up window is: Drive leter, where you installed TC ... that is, C: \ or D: \ or something else, followed by the path to the INCLUDE and LIB folder. So in my case

    In field

    INCLUDE is set to: "C: \ TC \ INCLUDE" and the value in the LIB directory field is set to: "C: \ TC \ LIB" (without quotes). Steps to solve:

  • Press ALT + C.

  • Set the current directory as C: \ TC \ BGI
  • Press ALT + O + D and place the .. / INCLUDE and ../ LIB values ​​in the Include / Lib directory values.
  • and now ... when you start your progress, you will thank me. I like the fractal graphics of the Archduke C, which I now work with on DOS Turbo C. Lol.
+3
source share

Go to the "OPTIONS" tab, then select the "Directories" option, then enter the specific path where your folder with turbo c exists.

Enter the path into all four message boxes and it will start working, as in my case. I have TurboC3, and all the files were together in one shared root folder.

+3
source share

Check if your environment includes a path. The file is not located in the places this environment variable points to.

+2
source share

Since you did not specify which version of Turbo C, this method below will cover both v2 and v3.

  • Click "Options", "Directories", enter the correct location of the Include and Lib directories.
+1
source share

Make sure that the folder with the standard header files is in the project path.

I don’t know where it is in Turbo C, but I think there is a way to do this.

0
source share

On most systems, it will be quite difficult for you to find " <stdio.h> " until the first response is "set < <stdio.h> ". So, I would see if the file exists in a plausible place. If not, your Turbo C installation will fail; reinstall. If you can find it, you will need to establish why the compiler is not looking for it in the right place - what compiler options you specified and where the compiler is looking for its headers (and why it is not) where the header is located).

0
source share

First, check whether the folder name is correct or incorrect, because when you copy to one folder from another by accident, it takes a different folder address, for example, instead of F instead of F need C because of OPTION>DIRECTORY change the name of the folder

0
source share

Just install Turbo C ++ from your computer and reinstall it in the C: \ TC \ Folder directory.

The problem exists again, then change the directory from FILE -> CHANGE DIRECTORY to C: \ TC \ BIN \

0
source share

Well, I work in the opposite direction, spent about 6 hours trying to figure it out.

All the above information led to this conclusion, along with one line in the dos prompt, when I exit the editor, go to the dos prompt and my C: drive is installed.

I did a dir search and I found: the way I installed the C drive originally looked like this:

 mount c: / 

and my directory did not list all the files in the files only from drive C in the turboC ++ directory. From this, I concluded that my directories should look like this:

c:\include

not

c:\turboc++\tc\include

or

c:\tc\include

The real problem was how I mounted the disk.

Hope this helps someone.

b.mac

0
source share

All Articles