c++compilationborland-c++

Borland can't compile. What is going on? I can't even get started


Consider:

cd C:\BORLAND\BCC55\BIN
bcc32 hello.cpp

Output:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
hello.cpp:
Error E2209 hello.cpp 2: Unable to open include file 'iostream'
Error E2090 hello.cpp 6: Qualifier 'std' is not a class or namespace name in fun
ction main()
Error E2379 hello.cpp 6: Statement missing ; in function main()
*** 3 errors in Compile ***

I read the instructions at Embarcadero. Now, it says...

#include <iostream.h>
int main(void)
{
    cout << "Hello." << endl;
    return 0;
}

Compile:

cd C:\Borland\BCC55\Bin\MySource
bcc32 hello.cpp

Output:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
hello.cpp:
Error E2209 hello.cpp 1: Unable to open include file 'iostream.h'
Error E2451 hello.cpp 4: Undefined symbol 'cout' in function main()
Error E2451 hello.cpp 4: Undefined symbol 'end' in function main()
Error E2379 hello.cpp 4: Statement missing ; in function main()
*** 4 errors in Compile ***

Solution

  • Seriously, you're going to keep having troubles if you continue to use Borland's compiler. It's free from their computer museum for a reason - it's ancient. The copyright line itself should be proof enough of that:

    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland

    Do you really want a compiler that hasn't been updated in decades, one that the standard has long since left behind?

    It's the compiler you get if you're interested in vintage computing stuff, in the same league as people with TRS-80 and Apple II emulators :-)

    Download Microsoft Visual C++ Express and install it. It's as free (as in cost) as the Borland one and substantially more up to date. See here for the product page.

    Or there are many other more up-to-date development tools you can get for free as well, such as gcc, Code::Blocks and so forth.