Go Back  Xtreme Visual Basic Talk > Other Languages > Miscellaneous Languages > Error E2209: Unable to open include file 'stdio.h'


Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2004, 04:48 AM
NBN NBN is offline
Newcomer
 
Join Date: Jan 2004
Location: Denmark/Copenhagen
Posts: 4
Exclamation Error E2209: Unable to open include file 'stdio.h'


Hiya all!
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
Hi.c:
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
main
*** 1 errors in Compile ***

This is my simple program called Hi.c:

#include <stdio.h>

int main()
{
printf("Hi there/n");
return 0;
}

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.

Thanks in advance.
NBN
Attached Files
File Type: txt Hi.txt (421 Bytes, 2 views)
Reply With Quote
  #2  
Old 01-15-2004, 06:56 AM
an5w3r's Avatar
an5w3r an5w3r is offline
Senior Contributor
 
Join Date: Jan 2004
Location: Romania
Posts: 1,342
Default

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
__________________
Fully customizable and easy to use .NET WPF charting library http://www.SoftwareGFX.com
Reply With Quote
  #3  
Old 01-15-2004, 07:26 AM
NBN NBN is offline
Newcomer
 
Join Date: Jan 2004
Location: Denmark/Copenhagen
Posts: 4
Default

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.
Reply With Quote
  #4  
Old 01-15-2004, 07:30 AM
an5w3r's Avatar
an5w3r an5w3r is offline
Senior Contributor
 
Join Date: Jan 2004
Location: Romania
Posts: 1,342
Default

#include <iostream.h>

void main()
{
cout<<"Hello world!";
}
__________________
Fully customizable and easy to use .NET WPF charting library http://www.SoftwareGFX.com
Reply With Quote
  #5  
Old 01-15-2004, 08:13 AM
NBN NBN is offline
Newcomer
 
Join Date: Jan 2004
Location: Denmark/Copenhagen
Posts: 4
Default

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
Borland hi.c:
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!)

Last edited by NBN; 01-15-2004 at 08:44 AM.
Reply With Quote
  #6  
Old 01-15-2004, 09:08 AM
NBN NBN is offline
Newcomer
 
Join Date: Jan 2004
Location: Denmark/Copenhagen
Posts: 4
Default

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 ^^;;
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File I/O GavinO Tutors' Corner 5 04-17-2013 02:18 PM
Makin a nice little program! Decontain Communications 3 04-11-2003 03:54 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->