Professional Documents
Culture Documents
Creating A Console Project With Borland C++ Compilers
Creating A Console Project With Borland C++ Compilers
To create a DOS Project with Borland C++ 5.02 IDE follow the steps (rather clicks ☺)
outlined below:
http://edn.embarcadero.com/article/21205
or
http://www.embarcadero.com/products/cbuilder/free-compiler
It is a command line compiler. There is no IDE and it runs only in a DOS window. It is
very easy to use and it is fast. To enforce ANSI C you must use the –A option. To set
the environment for Borland 5.5 you must go to Start, Programs, Programing &
Development, Borland C++ Compiler, Borland C++ Compiler. It will set the environment
and will open a DOS window for you. Now you can compile, link and run your program.
Example: N:\>bcc32 –A cdtypes.c
This will compile, link and generate cdtypes.exe file. When you want to compile a
project containing more than one file, you do so through simply typing all .c ( and/or
.obj) file names separated with a space. No need to create a project.
The compiler supports all the options you can find in the Project Options window.
To find how to set them, open the Project Options window using Borland 5.02 IDE,
select the option you interested in and click the Help button. It will explain the option
and will give you the command line settings.
Possible problems
To create a DOS Project with Borland C++ 4.52 follow the steps outlined bellow:
1. Run Borland C++ 4.52 and close all documents windows if you have some open.
14. Select Project, New project from the main menu bar.
15. Specify the Project Path and Name. Use the same directory (folder) where you
save your source files.
16. Specify the Target Name. For example lab0.
17. Specify the Target Type: Application[.exe]
18. Specify the Platform: DOS (Standard) (also called a command-line program or
console program).
19. Specify the Target Model: Large.
20. Specify the Standard Libraries: First uncheck everything then check Runtime
and Floating Point.
21. Click on the Advanced button and select No Source Node. Click OK.
22. Click OK and you should see the Project document window.
23. Move the mouse cursor there and click on target name [.exe]. Click with the right
button. Select Add Node. Add your lab0.c file. If the file does not exist, type the
name in the File Name text box. Repeat the operation if you have more xxx.c files.
24. Click with the right button. Select Edit Local Options. Select Directories. Specify
your Source, Intermediate, and Final directories. If you leave them empty, the
current one will be used.
25. Select Compiler>Source. Select ANSI. Select Compiler>Debugging. Check Test
Stack Overflow. Select Compiler>Precompiled headers. Check Do not generate or
use.
26. Select 16-bit Compiler>Processor. Check i486.
27. Click on OK button and your Project is ready.
28. Now you can open your .c and .h files if they already exist. If they do not exist yet
but they are specified in your project (see step 11) you should open a text edit
window. You can do this using the File menu option or using the mouse in the
project window. Highlight the file name, click the right button and use the View,Text
Edit option. You can write new files and add them to the project at any time.
29. To compile and/or link your program, you can use the tool bar or you can click with
the right button in the project window and select Make node, Build node, or Link.
30. To run the program, you must open a DOS window and type the target program
name and the command line arguments at the command line. Do not forget to make
the directory containing your xxx.exe file current.
S^R, 2013