Error E2209: Unable to open include file 'stdio.h'
Im going for C/C++ for the first time, and have loaned a couple (20++) C/C++ books from the local libery.
The first thing i tried was to make a nice, little and simple program greeting me on my first succes with a nice "Hi there!"
Prob is, that was not how it went.
Im using a fresh install of the free Borland C++ Compiler 5.5 and i have also tried Digital Mars, with the same results.
I checked both compilers and they both comes with stdio.h nonetheless i get this:
C:\Documents and Settings\**********\Skrivebord\C++\Compilers and Misc\Borland\Bin>bcc32 Hi.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2209 Hi.c 1: Unable to open include file 'stdio.h'
Warning W8065 Hi.c 5: Call to function 'printf' with no prototype in function
*** 1 errors in Compile ***
This is my simple program called Hi.c:
I have added a .txt format of my program and problem, i would be overjoyed if anyone would give it a try and see if they can find the prob, and report back with the functioning code, what i did wrong and how to never do it again.
the problem seems to be that the function printf it's not declared in your stdio.h file or check if u have the stdio.h file in the /include folder
TIP. look in the stdio.h and search for printf... if u dont find any info that means u dont have it's prototype declared... i recommand u to use borland c++ 3.1 for msdos programming
I looked in the /include folder of both compilers i tried, and they both got stdio.h, the prob is that i am following a book that explains how to program in C/C++ and it starts out easy with this little program.
If printf doesnt exist, which is weird, what should i use to get the same results? it prints the text onto the screen.
For a second i trought that was the answer, and that the (newer?) stdio didnt include printf (anymore)
So i use your code insted, having seen it somewhere else too (online tuturial?) but now it simply says:
C:\Documents and Settings\************\Skrivebord\C++\Compilers and Misc\borland\Bin>bcc32 hi.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000
Error E2209 hi.c 1: Unable to open include file 'iostream.h'
Error E2451 hi.c 5: Undefined symbol 'cout' in function main
*** 2 errors in Compile ***
Whats wrong? it seems that both my compilers (that are fresh installs) cant find/open the include files!
I checked, both iostream.h and stdio.h exists in the folders include!
Why cant the compilers find the include files? They are there and i been using two diff'rent compilers to compare, and they both got that problem!
(btw, i checked, it doesnt seem stdio.h define the printf command, irritating, i might have to use online tuts after all insted of easy to read Danish manuals/learning books, dammit!)
WHOOOPS! my fault, seems since both compilers got that in common that they are selfunpacking and claims that they work right out fo the box, they forgot to mention that i had to read the "readme.txt" troughoutly about installing, it seems i had to make the .cfg files all by myself directing the bcc32.exe and such to the right paths for include and lib
Terribly sorry, everything works now ^^;;