Borland Online And The Cobb Group Present:


April, 1994 - Vol. 1 No. 4

Compiling TV from the command line

In the accompanying article, Using TurboVision 1.03 - Putting the "Turbo" back in TurboVision we tell you how to correct two problems in the TV source files using the DOS Integrated Development Environment (IDE). If you'd rather recompile the source files from the command line and you've installed the command-line compiler (BCC.EXE), the process is very straightforward.

First, make the change to line 42 of TSCREEN.CPP that we describe in the main article. Then, make \TVISION\SOURCE the current directory by entering

cd\borlandc\tvision\source

To create a new OBJ file for the file TSCREEN.CPP, enter

bcc -I..\include -c -P -O1 -ml tscreen.cpp

In this command, we've set each of the compiler options by using the appropriate command-line parameters.

For example, the -I..\include parameter tells the compiler where to find the header files. The -c parameter tells the compiler to stop after it creates the object file, and the -P parameter forces the compiler to interpret the file as a C++ source file.

Toward the end of the command, the -O1 parameter tells the compiler to create the smallest possible code, and the -ml parameter tells the compiler to compile for the Large memory model. If the command succeeds, BCC will display the following:

Borland C++ Version 3.1 Copyright (c) 1992
		      Borland International
tscreen.cpp
Available memory 3566400

To use the same process to create the new OBJ file for NEW.CPP, enter

bcc -I..\include -c -P -O1 -ml -DNDEBUGnew.cpp

In this command, the only difference is the -DNDEBUG parameter, where the -D option creates the defined constant NDEBUG. Now you can use TLIB as described in the main article to replace the old versions of these modules.

Return to the Borland C++ Developer's Journal index

Subscribe to the Borland C++ Developer's Journal


Copyright (c) 1996 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of Ziff-Davis Publishing Company.