ebook img

borland :: borland C++ :: Borland C++ for OS2 Version 1.5 Tools and Utilities Guide 1994 PDF

121 Pages·1994·4.6 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview borland :: borland C++ :: Borland C++ for OS2 Version 1.5 Tools and Utilities Guide 1994

lor OS/2® Tools and Utilities Guide Borland® C++ for OS/2® Version 1.5 Borland may have patents andbr pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. COPYRIGHT © 1987, 1994 by Borland International. All rights reserved. All Borland product names are trademarks or registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders. Borland International, Inc. 100 Borland Way, Scotts Valley, CA 95066-3249 PRINTED IN THE UNITED STATES OF AMERICA 1E OR0294 9495969798-987654321 H1 Contents Introduction 1 Compatibility with Microsoft's NMAKE ... 22 Using makefiles ............................ 23 Chapter 1 TUNK: The Turbo linker 3 Symbolic targets ......................... 23 - Invoking TLINK ............................. 3 Rules for symbolic targets ............... 24 Using TLINK with Borland C++ modules ..... 4 Explicit and implicit rules ................... 24 Initialization modules .................... 5 Explicit rule syntax ....................... 24 A TLINK example ......................... 5 Single targets with multiple rules ......... 25 Invoking TLINK with BCC ................. 6 Implicit rule syntax ....................... 26 File-name extensions on the TLINK command Explicit rules with implicit commands .... 26 line ...................................... 6 Commands syntax ........................ 27 Using response files ........................ 7 Command prefixes ..................... 27 The TLINK configuration file ............... 8 Using@ ............................... 27 TLINK options .............................. 8 Using -num and - ...................... 27 I a (application type) ....................... 9 Using & ............................... 28 I A (align pages) ........................... 9 Command operators .................... 28 IB (base address) .......................... 9 Debugging with temporary files .......... 28 I c (case sensitivity) ........................ 9 Using MAKE macros ....................... 29 IE (maximum errors) ...................... 9 Defining macros ......................... 29 IGm (Goodies) ............................ 9 Using a macro ........................... 30 IL (library search paths) ................... 10 String substitutions in macros .............. 30 1m, Is, and Ix (map options) .............. 10 Default MAKE macros .................... 31 IOc (chain fixups) ........................ 11 Modifying default macros ................. 31 IS (stack size) ............................ 11 Using MAKE directives ..................... 32 IT (output file type) ...................... 11 .autodepend ............................. 33 Iv (debugging information) ............... 11 !error ................................... 33 Iw (warning control) ..................... 12 Summing up error-checking controls ..... 33 Module definition reference .................. 12 !if and other conditional directives .......... 34 CODE statement ......................... 13 !include ................................. 35 DATA statement ......................... 13 !message ................................ 35 DESCRIPTION statement .................. 14 .path.ext ................................ 36 EXETYPE statement ...................... 14 .p recious ................................ 36 EXPORTS statement ...................... 14 .suffixes ................................. 36 IMPORTS statement ...................... 15 !undef .................................. 36 LIBRARY statement ...................... 16 Using macros in directives ................. 37 NAME statement ......................... 16 Null macros ............................. 37 SEGMENTS statement .................... 16 STACKSIZE statement .................... 17 Chapter 3 TUB: The Turbo librarian 39 STUB statement .......................... 17 Why use object module libraries? ............. 39 The TLIB command line ..................... 40 Chapter 2 Make: The program manager 19 The operation list ......................... 40 MAKE basics ........................ ~ ..... 19 ' File and module names ................. 41 BUILTINS.MAK .......................... 20 TLIB operations ........................ 41 Using TOUCH.EXE ....................... 21 Using response files ........................ 42 MAKE options ........................... 21 Setting the page size: The IP option .......... 42 Setting options on as defaults ............ 22 Advanced operation: The /C option .......... 43 RC.EXE: The OS/2 resource compiler ......... 51 Examples .................................. 43 Appendix A Error messages 53 Chapter 4 Import library tools 45 Message classes ............................ 53 IMPLIB: The import librarian ................ 45 Fatal errors .............................. 53 IMPDEF: The module definitions file manager . 46 Errors ................................... 53 Classes in a DLL .......................... 47 Warnings ................................ 54 Functions in a DLL ....................... 47 Message listings ............................ 54 Message explanations ....................... 55 Chapter 5 Resource tools 49 BRCC.EXE: The resource compiler ............ 50 Index 103 Examples .............................. 50 Tables 1.1 TLINK options ........................... 3 2.8 MAKE directives ....................... 32 2.1 MAKE options .......................... 21 2.9 Conditional operators ................... 34 2.2 Command prefixes ...................... 27 3.1 TUB options ........................... 40 2.3 Command operators .................... 28 3.2 TUB action symbols ..................... 41 2.4 Command line vs. makefile macros ........ 30 4.1 IMPUB options ......................... 46 2.5 Default macros ......................... 31 5.1 BRCC (Borland resource compiler) ........ 50 2.6 Other default macros .................... 31 5.2 Resource Compiler options .............. 52 2.7 File-name macro modifiers ............... 32 iii iv Introduction Borland C++ comes with a host of powerful standalone utilities that you can use with your Borland C++ files or other modules to ease your DOS and Windows programming. This manual describes IMPDEF, IMPLIB, MAKE, TLIB, and TLINK and uses code and command-line examples to show how to use them. It also describes the Borland and OS/2 resource compilers. The rest of the Borland C++ utilities are documented in a text file called UTIL.DOC, which the INSTALL utility places in the DOC subdirectory. The Borland C++ error messages are listed and described in Appendix A. Name Description Documented in this book TUNK Turbo Linker (see Chapter 1) MAKE Standalone program manager (see Chapter 2) TUB Turbo Librarian (see Chapter 3) IMPUB Generates an import library (see Chapter 4) IMPDEF Creates a module definition file (see Chapter 4) BRCC.EXE Borland Resource Compiler (see Chapter 5) RC.EXE OS/2 Resource Compiler (See Chapter 5) Documented in the online document UTlL.DOC cpp Preprocessor GREP File-search utility OBJXREF Object module cross-reference TEMC Turbo Editor Macro Compiler TOUCH Updates file date and time TRIGRAPH Character-conversion utility Introduction 2 Borland C++ for OS/2 Tools and Utilities Guide c H A p T E R 1 TLINK: The Turbo linker This chapter explains the operation of Borland's command-line linker TLINK. TLINK combines object modules and library modules to produce .EXE files. When you invoke the command-line compiler BCC, TLINK is invoked automatically unless you suppress the linking stage with the -c compiler option. If you suppress the linking stage, you must invoke TLINK manually, as described in the next section. Invoking TLINK TLiNK options are The general syntax of a TLINK command line is case-sensitive. TLINK options objfiles, exefile, mapfile, libfiles, deffile This syntax specifies that you supply file names in the given order, and that you separate the file types with commas. You can invoke TLINK at the command line by typing TLINK with or without parameters. TLINK parameters are either options or file names. Options let you control TLINK's output. For example, they let you specify whether you want to produce an .EXE or a DLL file. TLINK options must be immediately preceded by either a forward slash (I) or a hyphen (-). When invoked without parameters, TLINK displays an option summary. Table 1.1 briefly describes the TLINK options. Table 1.1 TLiNK options Option What it does lax Specifies application type, where laa targets PM applications TLiNK options can lai targets full-screen character mode applications also be preceded by a hyphen (-). lap targets PM-compatible character mode applications. IA:dd Specifies page alignment within .EXE file. IB:xxxxxx Specifies image base address (in hexadecimal). Ie Treats case as significant in symbols. IEnn Specifies maximum errors before termination. Chapter 1, TUNK: The Turbo linker 3

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.