Sunteți pe pagina 1din 2

"copied from http://www.cprogramming.com/borland.

html"

you can download borland c++ compiler from this website:

http://www.codegear.com/downloads/free/cppbuilder

follow the instructions below:

borland's webpage has information on their compilers, as well as some free downloads of their
earlier compilers (though you probably don't want to use those as they are out of date). they are
now giving away a new version of their compiler, borland c++ 5.5 for free download. it does
require you to become a member of the borland community before downloading the file, but this
registration takes place immediately.

note that this compiler is a command-line tool: you will need to feel comfortable running it from
the dos prompt, or set up an "ide" (integrated developer's environment).
setting up your compiler
once you've downloaded the borland compiler, you can take take the default installation options,
including the default directory, "c:\borland\bcc55". once you've done that, follow the instructions
below to get the compiler ready to use.

* first, we need to tell the compiler where to find the include files and supporting libraries. to do
this, open up notepad (or any other text editor) and paste the following two lines into a blank file:

-i"c:\borland\bcc55\include"
-l"c:\borland\bcc55\lib"

* save this file in notepad as "c:\borland\bcc55\bin\bcc32.cfg". to do this, just go to "save as"


under the "file" menu, then type the entire file name, in quotes, into notepad. you need to include
the quotes to keep it from adding a .txt extension.
* now paste the following line into a new blank text file:

-l"c:\borland\bcc55\lib"

* save this new file as "c:\borland\bcc55\bin\ilink32.cfg"

great, now you're ready to start writing and compiling programs.


compiling and testing your installation
since borland c++ 5.5 is a command-line tool, you will need to run it from the command line.
before trying to compile a program, you'll need to actually write some code to test the compiler.
you can do this in notepad, or download a better text editor. at any rate, you'll want to save the file
in the "c:\borland\bcc55\bin" directory. if you save it in notepad, be sure to enclose the name in
quotes to make it a ".cpp" file instead of a ".txt" file.

here's a simple program you can copy into notepad and save as "c:\borland\bcc55\bin\test.cpp" to
test your compiler's installation:

#include <iostream>

int main()
{
std::cout<< "i work!" << std::endl;
}

borland c++'s compiler is actually named "bcc32" and it is located in the "c:\borland\bcc55\bin"
directory; the below instructions will take you through compiling your first program.
compiling the program

* go to start, click on run, and type "command", and hit enter.


* now, type "cd c:\borland\bcc55\bin" and hit enter.
* you should be in the above directory now (your prompt should read: "c:\borland\bcc55\bin"); if
not, check that you typed it correctly.
* type in "bcc32 test.cpp" and hit enter. this should result in the following output if everything
worked:

borland c++ 5.5.1 for win32 copyright (c) 1993, 2000 borland
test.cpp:
turbo incremental link 5.00 copyright (c) 1997, 2000 borland

which means that it worked.


* you can now run your test program by typing "test.exe" and hitting enter. you should see the
text:

i work!

S-ar putea să vă placă și