I am working thru the Wrox book: [U]Beginning Programming[/U], and need some advice on getting a simple program to compile. I have Vista and use the free Borland C++ compiler. After entering in a simple C++ code, I was not able to get it to compile. When I attempted to compile the code, I received an E2209 error, the compiler was unable to open the include file 'iostream.h' In an attempt to troubleshoot the errors, I made some changes as follows using info from this site: http://dn.codegear.com/article/21205
A. Appended Environment Variables:
1. Opened Control Panel.
2. Navigated to System.
3. Clicked on "Advanced System Settings".
4. Clicked on the "Advanced" tab, to open the
"System Properties" window.
5. Clicked on the "Environment Variables" button.
6. Highlighted the "Path" System variable (bottom).
7. Clicked on the "Edit" button.
8. Appended the line with ";C:\BORLAND\BCC55\BIN;".
9. Clicked OK (3 clicks) and exited the System Properties
window.
B. Set up the configuration files:
1. From the command prompt, I changed directory to
"C:\BORLAND\BCC55\BIN"
2. Created the file BCC32.CFG. as follows:
a) Typed "[B]edit bcc32.cfg[/B]" [Enter].
b) A blank window opened in the editor.
c) Entered the 2 lines below into the blank window.
[B]-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"[/B]
d) Created ILINK32.CFG in the same manner as above.
[B]-L"c:\Borland\Bcc55\lib"[/B]
e) Saved the files and exited the command prompt.
f) Restarted Windows.
C. From Chapter 7 of Beginning Programming, I entered the following
code into a text editor(EditPad Lite):
C++ code template
#include <iostream.h>
void main()
{
//code goes here
}
-
D. I saved the file as "Template.cpp" in C:\Progs.
E. From the command prompt I entered the following:
C:\borland\bcc55\bin\bcc32.exe C\Progs\Template.cpp
F. The output was as follows:
Error:
C:\Users\Allen>c:\borland\bcc55\bin\bcc32.exe c:\progs\template.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\progs\template.cpp:
Error E2209 c:\progs\template.cpp 2: Unable to open include file 'iostream.h'
*** 1 errors in Compile ***
-
G. I have searched for the error and can't find it. My configuration
files are properly located at C:\Borland\BCC55\Bin. I have tried
experimenting with the appending in the Environment Variables
window. I entered iostream with and without the "h", and get
the same result.
Thanks in advance if you can help me out with this.
Allen