Hello World!
|
|||
|
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:
|
||
|
|||
|
|||
|
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
|
||
|
|||
|
|||
|
Rank: ? (12)
Member #: 9597 |
I already try ur advice, but still its give me the same error.
|
||
|
|||
|
|||
|
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/
|
||
|
|||
|
|||
|
Rank: ? (12)
Member #: 9597 |
Code:
|
||
|
|||
|
|||
|
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. |
||
|
|||
|
|||
|
Rank: ? (12)
Member #: 9597 |
Code:
Code:
Any mistake with my configuration file? |
||
|
|||
|
|||
|
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/
|
||
|
|||
|
|||
|
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 |
||
|
|||
|
|||
|
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:\\?
|
||
|
|||
|
|||
|
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 |
||
|
|||
|
|||
|
Rank: ? (200)
Member #: 9404 |
Hehe in modifying the C: to D:, you probably deleted the L after the - in -L.
|
||
|
|||
|
|||
|
Rank: ? (12)
Member #: 9597 |
Hehe another lame mistake, and its success now! Thanxs to you all for da advice
|
||
|
|||
|
|||
|
Rank: Unregistered
|
i have same problem but i donno how to fix
|
||
|
|||
|
|||
|
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 |
||
|
|||
|
|||
|
Rank: Unregistered
|
how to fix???
|
||
|
|||
|
|||
|
Rank: Unregistered
|
i have same problem .. :> my bcc show this error:
Code:
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 |
||
|
|||
|
|||
|
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 |
||
|
|||
|
|||
|
Rank: Unregistered
|
Save yourself the trouble and use something along the lines of Dev-C++. You're wasting valuable learning time with this.
|
||
|
|||
|
This post has been removed by a moderator (reason: smiley spam)
|
|||
|
Please login or register to post a reply.