📄 readme.txt
字号:
See the User's Guide.
See also the online Help.
For information on keyboard mapping and KEYMAPR (used to be called TEMC):
See the online Help.
For information on using the IDE, AppExpert & ClassExpert, the Integrated
Debugger, and compiling options:
See the User's Guide.
See also the online Help.
For information on using the new Project Manager:
See the online Help.
For information on converting your ObjectWindows 1.0 code to
ObjectWindows 2.0:
See the ObjectWindows Programmer's Guide.
See also the online text file owldoc.wri.
For information on programming in ObjectWindows 2.0:
See the ObjectWindows Reference Guide, and the
ObjectWindows Programmer's Guide.
See also the online text file, owldoc.wri.
For help using Turbo Debugger:
See the online text files helpme!.tdw and hints.tdw.
See also the online Help.
To use the online Help, make sure the Borland C++ 4.0 \BIN directory is
on your path.
------------------------
4. IMPORTANT INFORMATION
------------------------
GENERAL
-------
Note that if you have only 8 MB of RAM, you might experience some out-of-memory
problems building and using 32-bit applications. Please see the section below
titled, "Out of memory and MAKESWAP".
Object File Format
------------------
This product is designed to use and generate only object files which adhere
to the Intel OMF (Object Module Format) specification. This means that TLINK32
and TLIB only accept files of this format, and all provided libraries use
this format. There is no support in the linker or librarian for COFF object
modules produced by Microsoft C tools.
MAKE
----
MAKE will not put a space between two sets of file list macros as in BC++ 3.1
and before. The example makefile below illustrates this; simply execute MAKE
in the directory containing the makefile. The output is:
ALLOBJS1 = one onetwo two
ALLOBJS2 = one one two two
makefile:
OBJS1 = \
one \
one
OBJS2 = \
two \
two
ALLOBJS1 = $(OBJS1)$(OBJS2)
ALLOBJS2 = $(OBJS1) $(OBJS2)
..:
@@echo ALLOBJS1 = $(ALLOBJS1)
@@echo ALLOBJS2 = $(ALLOBJS2)
Out of Memory and MAKESWAP
--------------------------
If you get "Out of Memory" errors from DOS when running the
command-line tools, create a swap file with the MAKESWAP utility.
(Note that this applies to DOS only, not to DOS boxes opened under
Windows.) MAKESWAP takes the size of the file to create in KBytes,
for example:
MAKESWAP 12000
will create a 12MB swap file in the current directory called EDPMI.SWP
for use by Borland command line tools. To enable the swap file, use
the DPMI32 environment variable by issuing the following command at
the DOS prompt:
set DPMI32=SWAPFILE <location of swap file>\EDPMI.SWP
Note that you must clear this environment variable by issuing the
command
set DPMI32=
before running Paradox or other 16-bit DPMI-hosted executables,
such as Borland C++ 3.1 command-line tools.
Threads
-------
When creating secondary threads, the _beginthread or _beginthreadNT and
_endthread() RTL functions must be used to ensure the proper RTL
initialization and cleanup. Using NT's CreateThread and ExitThread functions
will result in undefined behavior if an implicit or explicit call is made to
the RTL. Note that using exception handling and/or RTTI can lead to implicit
RTL calls.
DDVT functions and RTTI
-----------------------
When compiling code that contains DDVT functions, do not use run-time type
information. If you attempt this, you will receive an error message. In order
to compile without using run-time type information, compile all code that
uses DDVTs (for instance OWL 1.0x libraries and applications) with the
-RT- switch (Options|Project|C++ Options|Exception handling\RTTI in the IDE).
Inline assembly and interrupts
------------------------------
If your inline assembly code includes an interrupt call, the compiler does not
preserve any registers altered by the call. You must write code to save and
restore registers when using interrupt calls within inline assembly code.
Obsolete Win32 functions
------------------------
To discover when a function (such as DOS3Call) is obsolete under Win32, click
on the hypertext link for "Win32 version" in Online Help. This leads to a new
screen explaining that you can't use this function in Win32. When a
function works differently in the two versions, a link appears on the
first screen enabling the user to jump directly to help for the Win32
version of the function.
BC4 path name
------------------
Any occurrence of BORLANDC in the BC++ 4.0 path should be replaced with BC4.
Creating 16-bit import libraries from .DEF files
------------------------------------------------
Use the /o implib switch when creating 16-bit import libraries from .DEF files
to prevent implib from generating extensions for import entry module names.
Debugging DDE applications
--------------------------
DDE applications must be debugged in hard mode.
----------
New Tools
----------
The 16-bit linker has been modified in this version to allow for more than 64K
symbols in the executable's symbol table. The following tools have changed to
conform to the resulting new debug information format:
TDW
TDUMP
Turbo Debugger (standalone)
IDE Debugger
IDE Browser
These tools have versioning information, so that if you attempt to use any of
them with executables created in prior versions, an error message will result.
You will then need to relink your executables.
If you don't see correct dump information when using TDUMP version 4.1 on your
executables, check the header at the top of the output. If it does not indicate
version 4.0 debug information, the associated .EXE file must be recompiled with
version 4.0 tools.
-------------------------------------
Running from a Windows 3.1 DOS Prompt
-------------------------------------
If you run BCC or TLINK from a Windows DOS box and you get
out of memory errors, increase the XMS memory (in the 'Maximum'
setting) allocated for the DOS box by editing the appropriate .PIF
file (usually DOSPRMPT.PIF). BCC.EXE needs about 4MB to compile
medium-sized .CPP files, and might need more memory for large .CPP
files with debugging information.
NOTE: You must set the 'Maximum:' setting to the amount needed, not
the 'Required:' setting. Using the 'Required:' setting only
sets aside memory for XMS, NOT for DPMI services and hence
any amount set in the 'Required:' setting box is unavailable.
-------------------
Developing under NT
-------------------
To do development on NT, use the command-line tools, Resource
Workshop, and TD32. Using the IDE under NT is not currently
supported.
----------------------
C/C++ Language Changes
----------------------
Many changes were made to the compiler in compliance with the
latest changes proposed by the ANSI C++ committee. These include
three distinct char types, enhancements to templates, support for
virtual functions differing in return types, and other improvements
listed here. See the Library Reference and the Programmer's Guide
for complete details on these changes and how they affect your
code.
wchar_t is a fundamental data type in C++ programs. In C programs it continues
to be a typedef defined in stddef.h. See online Help.
Enum operator overloading is also supported in this compiler.
The runtime library now supports the ANSI C++ string class.
If you already have a string class, it must be renamed for Borland C++ 4.0.
In addition, operator new and operator new[] now throw an
exception (xalloc), as specified by the ANSI C++ committee.
To get the old behavior, you can issue set_new_handler(0). (Note,
however, that set_new_handler(0) does not work with ObjectWindows
or string classes.) See Chapter 3 of the Programmer's Guide.
Note that arrays are now being allocated through operator new[]()
and deleted by operator delete[](). An example is provided in
Chapter 3 of the Programmer's Guide.
Borland C++ 4.0 implements ANSI C++ runtime type identification (RTTI). See
the Library Reference, "C++ runtime support", for a description of
class Type_info. RTTI and operator typeid() are fully described in
Chapter 3 of the Programmer's Guide.
Borland C++ 4.0 provides a full implementation of exception handling
under C++ and C. C exceptions can be handled in C or C++ code;
C++ exceptions can be handled only in C++ code. The C++ exceptions are
described in the Library Reference, "C++ run-time support." See Chapter 4
of the Programmer's Guide for a full description of how to use exception
handling.
Borland C++ 4.0 also implements the accepted ANSI C++ new style casts. See the
Chapter 3 of the Programmer's Guide for information and examples.
--------------------------
Libraries and Startup Code
--------------------------
The contents of the LIB directory are described in the online Help.
See the DOS Reference for a description of DOS-only libraries and
start-up code.
There are two new functions that provide access to 32-bit operating system
file handles. See online Help for a description of _open_osfhandle and
_get_osfhandle.
Member function Type_info::fname() is not available.
Several global variables and library functions have been renamed. See the
Library Reference, Chapter 1.
----------------------------------
Compiler and Linker Switch Changes
----------------------------------
See the User's Guide for information on new compiler and linker switches.
You may get this 32-bit Linker warning:
Warning: External symbol <XX> was not qualified with __import in
module <YY>
If the symbol <XX> is a function, you can ignore this warning. If
the symbol <XX> is data, then you must qualify the symbol with __import.
BCC32 provides support for the Pentium processor. This support is enabled
by the -5 compiler switch.
-----------------------------------------------------------------------
Converting Your Borland C++ Version 3.1 Windows Code to Borland C++ 4.0
-----------------------------------------------------------------------
To get your BC++ 3.1 code to compile and run successfully under Borland C++ 4.0,
you can modify your code to reflect three character types where compiler
errors occur when using the Borland C++ 4.0 RTL includes. Otherwise, you can
use the -K2 compiler option with the RTL includes from BC++ 3.1. This option
provides for only two character types. (Note that -K2, a backward
compatibility switch, is supported only in the 16-bit compiler.)
Also, use operator new[]() and delete[]() syntax for class arrays.
Note that certain 32-bit to 8-bit conversions allowed by ANSI are flagged
by BCC32 with "Conversion may lose significant digits in function XXXXX".
You can safely ignore this message if you are doing certain types of 32-bit
to 8-bit casts (for instance, int to char) and you're not worried about
losing significant digits in those cases.
------------------------------
Changes to the Class Libraries
------------------------------
Only the version of the class library implemented with C++ templates
is distributed and directly supported in Borland C++ 4.0.
The class library "object-based" include files are provided in the
\BC4\INCLUDE\CLASSLIB\OBSOLETE subdirectory. The object-based
libraries themselves are not supplied, but can be built using the
instructions found in the \BC4\SOURCE\CLASSLIB makefile (see the
comments located there).
TSArray and TSArrayIterator classes have been added to the class libraries.
They are aliases for TSArrayAsVector and TSArrayAsVectorIterator.
The Flush and Delete member functions for direct containers (except
dictionaries) no longer take a delete parameter (this parameter had been
ignored since direct containers have their own copy of the contained element).
For example:
TMArrayAsVector<double> arr(10);
arr.Flush(); // legal
arr.Flush(1); // illegal - causes syntax error
arr.Detach(index); // legal
arr.Detach(index,1); // illegal - causes syntax error
TMIArrayAsVector<double> arr1(10);
arr1.Flush(); // legal
arr1.Flush(1); // legal.
arr1.Detach(index); // legal
arr1.Detach(index,1); // legal
Bag and set container member function FindMember is now called Find.
It takes the same parameters.
Association containers now have a member function called DeleteElements:
void DeleteElements()
The dictionary containing the associations determines whether pointed-to
objects should be deleted, and, if so, calls DeleteElements for each of
the associations it holds. The Detach and Flush member functions for the
TMDictionaryAsHashTable template (and all templates derived from it)
have been changed to the following:
int Detach( const T &t, DeleteType dt = DefDelete )
void Flush( DeleteType dt = DefDelete )
These changes to the direct versions of the dictionary templates makes them
similar to an indirect container in how they handle object ownership. Here is
an example:
TDIAssociation<int,int> assoc( 3, new int(4) ); //create an association
TDictionaryAsHashTable<int,int> dict; //creates a dictionary
dict.Add( assoc ); //copies assoc into the dictionary
dict.OwnsElements(); //tell dict that it should delete pointed-to objects
dict.Flush(); //deletes the int created by new in the first line.
All list and double-list containers now have the DetachAtHead member function.
This function removes items from the head of a list without searching for a
match. The syntax is
int DetachAtHead() // for direct lists
int DetachAtHead( int del = 0 ) //for indirect lists
Example:
TMListImp<MyObject>list; //create list to hold MyObjects
list.Add(MyObject()); //construct a MyObject, add to list
list.Add(MyObject()); //add second MyObject
list.DetachAtHead(); //remove MyObject at head of list
Changes to class diagnostics
----------------------------
Previously, in order to create a diagnostic group you had to declare it
and define it in the same file:
DIAG_DECLARE_GROUP( Sample );
DIAG_DEFINE_GROUP( Sample, 1, 0 );
We also provided a macro that did both of these together:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -