Free2Code
 
Time: 2008-11-21, 08:41pm
Hello World!
Subject: Hello World!  ·  Posted: 2003-11-11, 11:26pm
Rank: ? (12)
Member #: 9597
Hello,

i need help with my 1st attempt in C++ programming. i've followed the hello world tutorial but when i try to compile, its give me the following error:

Code:
  1. H:\c>bcc32 hello.cpp
  2. Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
  3. hello.cpp:
  4. Error E2209 hello.cpp 1: Unable to open include file 'iostream.h'
  5. Error E2451 hello.cpp 5: Undefined symbol 'cout' in function main()
  6. *** 2 errors in Compile ***


 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-12, 01:12am
Rank: ? (614)
Member #: 9832
Hmm... sometimes you need to write #include <iostream> and sometimes #include <iostream.h> (depends on the compiler)
Also the path to /lib and /include needs to be correct but I think borland compiler updates the path automatically when the compiler is installed...
second error is caused by the first one

Chaos reigns within - Reflect, repent, and reboot - Order shall return
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-13, 01:18pm
Rank: ? (12)
Member #: 9597
I already try ur advice, but still its give me the same error.

 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-13, 07:38pm
Rank: ? (263)
Member #: 161
post the code

Smart people still exist and I've found where they've been hiding from me: http://shellcity.net/phpBB/
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-14, 08:04am
Rank: ? (12)
Member #: 9597
Code:
  1. #include <iostream.h>
  2. int main()
  3. {
  4.     cout << "Hello World!\n";
  5.     return 0;
  6. }


 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-14, 09:37am
Rank: ? (200)
Member #: 9404
Your code seems fine.

It's most likely (as mentioned by before) a problem with the compilers configuration. Search for a readme.txt in your installation directory. If I remember right, with bcc32, you'll be asked to create two config files which will indicate the paths of the headers and librarys.

- AlternateLifeform.
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-14, 08:05pm
Rank: ? (12)
Member #: 9597
Code:
  1. bcc32.cfg
  2. -I"c:\Borland\Bcc55\include"
  3. -L"c:\Borland\Bcc55\lib"


Code:
  1. ilink32.cfg
  2. -L "C:\Borland\BCC55\lib"


Any mistake with my configuration file?

 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-15, 03:36am
Rank: ? (263)
Member #: 161
I doubt it will work, but just incase..

try changing

-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"

to

-I "c:\Borland\Bcc55\include"
-L "c:\Borland\Bcc55\lib"

(I just added two spaces to seperate the option from the string)

Smart people still exist and I've found where they've been hiding from me: http://shellcity.net/phpBB/
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-15, 02:18pm
Rank: ? (12)
Member #: 9597
I try it, and now its give me error like this:
H:\c>bcc32 hello.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2075: Incorrect configuration file option: c:\Borland\Bcc55\include


 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-15, 06:58pm
Rank: ? (200)
Member #: 9404
Could be that the paths are set wrong. What's your installation root path? Are you sure you've installed the compiler in c:\\?
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-17, 12:14am
Rank: ? (12)
Member #: 9597
Arrgghhh u right, i installed the compiler at d: but i set the path to c:. I already fixed this but now when i try compile if give me another error:
H:\c>bcc32 hello.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
hello.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Expected an option: c:\Borland\BCC55\lib



 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-17, 05:33am
Rank: ? (200)
Member #: 9404
Hehe in modifying the C: to D:, you probably deleted the L after the - in -L.
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2003-11-18, 03:09am
Rank: ? (12)
Member #: 9597
Hehe another lame mistake, and its success now! Thanxs to you all for da advice

 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2004-04-07, 09:24am
Rank: Unregistered
i have same problem but i donno how to fix
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2004-04-07, 09:30am
Rank: Unregistered
---------- Capture Output ----------
"C:\Borland\BCC55\bin\bcc32.exe" Text2.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Text2.cpp:
Error E2209 Text2.cpp 1: Unable to open include file 'iostream.h'
*** 1 errors in Compile ***

Terminated with exit code 1




#include <iostream.h>

int main() {
//cout << "Hello world" << endl;
return 0;
}




C:\Borland\BCC55\Bin

in this map i put:

bcc32.cfg
-I"C:\Borland\BCC55\include"
-L"C:\Borland\BCC55\lib"


and


ilink32.cfg
-L"c:\Borland\BCC55\lib"



PATH=C:\Borland\BCC55\bin
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2004-04-07, 05:48pm
Rank: Unregistered
how to fix???
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2004-04-27, 07:02am
Rank: Unregistered
i have same problem .. :> my bcc show this error:

Code:
  1. C:\Borland\BCC55\Bin>bcc32 -tWC 5000.cpp
  2. Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
  3. Error E2075: Incorrect configuration file option: C:\Borland\BCC55\Include


before this error comes that he cant include any file.. :/ that is fixed, because i've forgottn to make files "bcc32.cfg" and "ilink32.cfg" .. But now comes this error

can somebody help me? :>


I'm sorry .. but my english not very good :> it's most bad.. very bad
 
  Reply to this ·  Post link ·  Top
Subject: dir error  ·  Posted: 2004-06-08, 05:56am
Rank: Unregistered
hey,

i dont know whether this will work, but i had this problem and i went into my bcc32.cfg file, and it said:

-I"C:\Borland\BCC32\include"
-L"C:\Borland\BCC32\lib"

I checked this out and found that the compiler had installed in c:\borland, and that there was no \BCC32 folder at all!!! Try taking out the \BCC32 folder from the bcc32.cfg file above. Good luck
 
  Reply to this ·  Post link ·  Top
Subject: Re: Hello World!  ·  Posted: 2004-06-12, 06:52pm
Rank: Unregistered
Save yourself the trouble and use something along the lines of Dev-C++. You're wasting valuable learning time with this.
 
  Reply to this ·  Post link ·  Top
This post has been removed by a moderator (reason: smiley spam)
 
  Top

Pages: 1 · 2

Please login or register to post a reply.

icons