?
Solved

Borland C++ Compiler Help (newbie question)

Posted on 2003-03-06
10
Medium Priority
?
333 Views
Last Modified: 2010-04-01
I'm having trouble compiling using Borland C++ Compiler

I download and installed the latest version and when I try to compile I get this the error message "unable to open include file 'iosteam.h'"? Any suggestions? This is what I typed in the console...

bcc32 -If:\Borland\bcc55\include -Lf:\Borland\bcc55\Lib c:\helloworld.cpp
0
Comment
Question by:SCE
  • 6
  • 3
10 Comments
 
LVL 6

Expert Comment

by:PlanetCpp
ID: 8085981
iosteam?
#include <iostream.h>
or actually..
#include <iostream>
using namespace std;
0
 

Author Comment

by:SCE
ID: 8086046
#include <iostream.h>
int main();

{

     cout << "Hello World!\n";
     return 0;
}

That's the source code.
0
 

Author Comment

by:SCE
ID: 8086052
nope it's a compiler probelm I think I'm not sure, I'm switching from Metroworks Codewarrior to Borland C++ Compiler
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:SCE
ID: 8086077
I've increased the points cause I would like to know how to use it before I log off tonight. Thanks for understanding.
0
 

Author Comment

by:SCE
ID: 8086114
here's the source code and a better explanation of what I'm doing.

******
#include <iostream>
int main();

{

std::cout << "Hello World!\n";
return 0;
}
******

I fire up my compiler

c:\borland\bcc32\bin>

then I type in

bcc32 -If:\Borland\bcc55\include -Lf:\Borland\bcc55\Lib c:\helloworld.cpp

and then I get errors line 1 : unable to open include file 'iostream.
line 4 : Declaration terminated incorrectly

Thanks inadvance

0
 
LVL 4

Expert Comment

by:gnunezr
ID: 8086180
Did you set up the config file for the compiler? If you just don't know what i'm talking about, i can expand further.
0
 

Author Comment

by:SCE
ID: 8086212
no how do you do that?
0
 
LVL 4

Accepted Solution

by:
gnunezr earned 300 total points
ID: 8086232
Create these 2 files in your bcc BIN directory:

1) bcc32.cfg containing:
 -I"f:\Borland\Bcc55\include"
 -L"f:\Borland\Bcc55\lib"

2) ilink32.cfg containing:
 -L"f:\Borland\Bcc55\lib"

Then try to recompile your source code.

Hope that helps
0
 
LVL 4

Expert Comment

by:gnunezr
ID: 8086270
As for the error in line 4:

Get rid of the ";" after main()

You wrote:

int main();

Should read:

int main()
0
 

Author Comment

by:SCE
ID: 8086282
Thanks, that solved the whole problem. Good Job for thinking out of the box.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question