Borland C++ Compiler 5.5 - kompilacja progamów, parametry bcc32.exe


Strona główna | Autor | Borland C++ 5.5 | GUI | Książki | OpenGL | Programy | Projekty | Teksty


Kompilacja progamów

W większości przypadków do kompilacji programów wystrczy następujące wywołanie w linii poleceń:

bcc32 program.cpp
W podobny sposób można kompilować więcej plików źródłowych, dodawać do projektu pliki skompilowane *.OBJ oraz biblioteki *.LIB. Oto przykładowe wywołania:
bcc32 plik1.cpp plik2.cpp plik3.cpp
bcc32 plik1.cpp biblioteka.lib
Program zawierające np. pliki z zasobami (RC, RES), najlepiej kompilować i konsolidować przy użyciu ilink32.exe, co opisuję tutaj.


Wybrane parametry bcc32

Poniżej przedstawiam wybrane parametry bcc32:


Wykaz parametrów bcc32

Poniższy opis parametrów kompilatora Borland C++ 5.5 pochodzi z dokumentacji do programu VIDE (V Integrated Development Environment) dostępnego pod adresem: http://www.objectcentral.com/vide.htm. Pełny opis parametrów zawiera także plik pomocy dołączony do pakietu.

switch Switch Description
+filename Use alternate configuration file named filename
@filename Read compiler options from the response file filename
-3 Generate 80386 protected-mode compatible instructions. (Default for 32-bit compiler)
-4 Generate 80386/80486 protected-mode compatible instructions.
-5 Generate Pentium protected-mode compatible instructions.
-6 Generate Pentium Pro protected-mode compatible instructions.
-a Default (-a4) data alignment; -a- is byte.
-an Align to n. 1=byte, 2=word (2 bytes), 4=double word (default), 8=quad word (8 bytes), 16=paragraph (16 bytes)
-A Use only ANSI keywords. (Extensions like the far and near modifier no longer recognized.)
-A- (Default) Enable Borland C++ keyword extensions: near, far, huge, asm, cdecl, pascal, interrupt, _export, _ds, _cs, _ss, _es.
-AK Use only K&R keywords.
-AT Use Borland C++ keywords (Alternately specified by -A-)
-AU Use UNIX V keywords. (Extensions like the far and near modifier no longer recognized.)
-b Make enums always integer-sized. (Default: -b make enums integer size)
-B Compiles assembly and calls TASM or TASM32. If you don't have TASM in your path, checking this option generates an error. Also, old versions of TASM might have problems with 32-bit generated assembler code.
-c Compile source files, but does not execute a link command.
-C Turn nested comments on. (Default: -C- turn nested comments off.)
-d Merge duplicate strings. (Default)
-Didentifier Define identifier to the null string.
-Didentifier=string Define identifier to string.
-efilename Derives the executable program's name from filename by adding the file extension .EXE (the program name is then filename.EXE). filename must immediately follow the -e, with no intervening whitespace. Without this option, the linker derives the .EXE file's name from the name of the first source or object file in the file name list.
-Efilename Use filename as the name of the assembler to use. (Default = TASM)
-f Emulate floating point. (Default)
-f- No Floating Point
-ff Fast floating point. (Default)
-F Uses fast huge pointers.
-Ff Create far variables automatically.
-Ff=1 Array variable 'identifier' is near warning. (Default)
-Fm Enables all the other -F options (-Fc, -Ff, and -Fs). Use this to quickly port code from other 16-bit compilers.
-gb Stop batch compilation after first file with warnings (Default: -gb-).
-gn Stop compiling after n messages. (Default: 255.)
-G Optimize code for speed. (Default: -G- optimize code for size.)
-H Generate and use precompiled headers. It might be called BC32DEF.CSM.
-H-(Default) Does not generate and use precompiled headers.
-Hfilename Sets the name of the file for precompiled headers
-H=filename Set the name of the file for precompiled headers to filename.
-Hc Cache precompiled headers. Use with -H, -Hxxx, -Hu, or -Hfilename. This option is useful when compiling more than one precompiled header.
-Hu Use but do not generate precompiled headers.
-in Make significant identifier length to be n, where n is between 8 and 250. (Default = 250)
-Ipath Set search path for directories for include files to path.
-jb Stop batch compilation after first file with errors. (default: off)
-jn Errors: stop after n messages. (Default = 25)
-Ja Expand all template members, including unused members.
-Jg Generate definitions for all template instances and merge duplicates. (Default)
-Jgd Generate public definitions for all template instances; duplicates result in redefinition errors.
-Jgx Generate external references for all template instances.
-k Turn on standard stack frame. (Default)
-k- Turn off standard stack frame. Generates smaller code, but it can't be easily debugged.
-K Default character type unsigned. (Default: -K- default character type signed.)
-lx Pass option x to the linker. More than one option can appear after the -l (which is a lowercase L).
-l-x Disable option x for linker.
-Lpath Set search path for library files.
-M Instruct linker to create a full link map.
-npath Set the output directory to path.
-O Optimize jumps. (Default: on)
-O1 Generate smallest possible code.
-O2 Generate fastest possible code.
-Od Disable all optimizations.
-Ox There are a bunch of tiny optimizations, but it is probably only necessary to used -O1 and -O2, so they are not covered here.
-OS Pentium instruction scheduling. (Default: off: -O-S)
-p Use Pascal calling convention. (This is a lowercase p.)
-pc Use C calling convention. (Default same as -pc or -p-)
-pr Use fastcall calling convention for passing parameters in registers.
-ps Use stdcall calling convention (32-bit compiler only).
-P Perform a C++ compile regardless of source file extension. (Default when extension is not specified. This is an uppercase P.)
-Pext Perform a C++ compile regardless of source file extension and set the default extension to ext. This option is available because some programmers use .C or another extension as their default extension for C++ code.
-q Quiet - suppress compiler banner.
-r Use register variables. (Default)
-rd Allow only declared register variables to be kept in registers.
-R Include browser information in generated .OBJ files.
-RT Enable runtime type information. (Default)
-S Generate assembler source compiles the named source files and produces assembly language output files (.ASM), but does not assemble. When you use this option, Borland C++ includes the C or C++ source lines as comments in the produced .ASM file.
-tW Make the target a Windows .EXE with all functions exportable. (Default)
-tWC Make the target a console .EXE.
-tWD Make the target a Windows .DLL with all functions exportable.
-tWM Make a multithreaded application or DLL.
-tWR Target uses the dynamic runtime lib. Can use -D_RTLDLL instead.
-tWCR Target uses the dynamic runtime lib for CONSOLE apps.
-T- Remove all previous assembler options.
-Tstring Pass string as an option to TASM, TASM32, or assembler specified with -E.
-u Generate underscores for symbols. (Default)
-Uname Undefines any previous definitions of the named identifier name.
-v Turn on source debugging.
-vi Turn on inline expansion (-vi- turns off inline expansion).
-V Create smart C++ virtual tables. (Default) This means the .objs are compatible only with Borland tools. The V0 and V1 can apparently be used with other tools, but why?
-V0 Create external C++ virtual tables.
-V1 Create public C++ virtual tables.
-Vmd Use the smallest representation for member pointers.
-Vmm Member pointers support multiple inheritance.
-Vmp Honor the declared precision for all member pointer types.
-Vms Member pointers support single inheritance.
-Vmv Member pointers have no restrictions (most general representation). (Default)
-Vx Zero-length empty class member functions.
-w Display warnings on.
-w! Do not compile to .OBJ if warnings were found. (Note: there is no space between the -w and the !.)
-wmsg Enable user define #pragma messages.
-w-xxx Disable xxx warning message.
-wxxx Enable xxx warning message.
  • amb -Ambiguous operators need parentheses.
  • amp -Superfluous & with function.
  • asm - Unknown assembler instruction.
  • aus - 'identifier' is assigned a value that is never used. (Default)
  • bbf - Bit fields must be signed or unsigned int.
  • bei - Initializing 'identifier' with 'identifier'. (Default)
  • big - Hexadecimal value contains more than three digits. (Default)
  • ccc - Condition is always true OR Condition is always false. (Default)
  • cln - Constant is long.
  • cpt - Nonportable pointer comparison. (Default)
  • def - Possible use of 'identifier' before definition.
  • dpu - Declare type 'type' prior to use in prototype (Default)
  • dsz - Array size for 'delete' ignored. (Default)
  • dup - Redefinition of 'macro' is not identical (Default)
  • eas - 'type' assigned to 'enumeration'. (Default)
  • eff - Code has no effect. (Default)
  • ext - 'identifier' is declared as both external and static (Default)
  • hch - Handler for '<type1>' Hidden by Previous Handler for '<type2>'
  • hid - 'function1' hides virtual function 'function2' (Default)
  • ibc - Base class '<base1>' is also a base class of '<base2>' (Default)
  • ill - Ill-formed pragma. (Default)
  • inl - Functions containing reserved words are not expanded inline (Default)
  • lin - Temporary used to initialize 'identifier'. (Default)
  • lvc - Temporary used for parameter 'parameter' in call to 'function' (Default)
  • mpc - Conversion to type fails for members of virtual base class base. (Default)
  • mpd - Maximum precision used for member pointer type type. (Default)
  • msg - User-defined warnings . This option allows user-defined messages to appear in the IDE message window.
  • nak - Non-ANSI Keyword Used: '<keyword>' (Note: Use of this option is a requirement for ANSI conformance.)
  • ncf - Non-const function 'function' called for const object. (Default)
  • nci - The constant member 'identifier' is not initialized. (Default)
  • nod - No declaration for function 'function'
  • nsf - Declaration of static function 'func(...)' ignored.
  • nst - Use qualified name to access nested type 'type' (Default)
  • ntd - Use '> >' for nested templates instead of '>>'. (Default)
  • nvf - Non-volatile function function called for volatile object. (Default)
  • obi - Base initialization without a class name is now obsolete (Default)
  • obs - Identifier is obsolete. (Default)
  • ofp - Style of function definition is now obsolete. (Default)
  • ovl - Overload is now unnecessary and obsolete. (Default)
  • par - Parameter 'parameter' is never used. (Default)
  • pch - Cannot create precompiled header: header. (Default)
  • pia - Possibly incorrect assignment. (Default)
  • pin - Initialization is only partially bracketed.
  • pre - Overloaded prefix operator 'operator' used as a postfix operator.
  • pro - Call to function with no prototype. (Default)
  • rch - Unreachable code. (Default)
  • ret - Both return and return of a value used. (Default)
  • rng - Constant out of range in comparison. (Default)
  • rpt - Nonportable pointer conversion. (Default)
  • rvl - Function should return a value. (Default)
  • sig - Conversion may lose significant digits.
  • stu - Undefined structure 'structure'
  • stv - Structure passed by value.
  • sus - Suspicious pointer conversion. (Default)
  • ucp - Mixing pointers to different 'char' types.
  • use - 'identifier' declared but never used.
  • voi - Void functions may not return a value. (Default)
  • xxx - Enable xxx warning message. (Default)
  • zdi - Division by zero (Default)
-W Creates a Windows GUI application. (same as -tW)
-WC Creates a 32-bit console mode application. (same as -tWC)
-WD Creates a GUI DLL with all functions exportable. (same as -tWD)
-WM Make a multithreaded application or DLL. (same as -tWM)
-WU Generates Unicode application. Uses -txxxx macros in tchar.h.
-x Enable exception handling. (Default)
-xd Enable destructor cleanup. (Default)
-xf Enable fast exception prologs.
-xp Enable exception location information.
-xp Enable slow exception epilogues.
-X Disable compiler autodependency output. (Default: -X- use compiler autodependency output.)
-y Line numbers on.
-zAname Code class set to name.
-zBname BSS class set to name.
-zCname Code segment class set to name.
-zDname BSS segment set to name.
-zGname BSS group set to name.
-zPname Code group set to name.
-zRname Data segment set to name.
-zSname Data group set to name.
-zTname Data class set to name.
-zX* Use default name for X. For example, -zA assigns the default class name CODE to the code segment class.
-Z Enable register load suppression optimization.


© Janusz Ganczarski
JanuszG@enter.net.pl