Copyright: Copyright © 1999 Inprise Corporation.                      All rights reserved.                                                 This Help file was compiled on   Friday, January 15, 1999 16:56:24.


What's new overview
What’s new overview

C++Builder 4 has many new features including Windows 98 support and the following new features and enhancements:

Project Manager

The Project Manager simplifies project management by allowing you to drag and drop files from Windows folders or other projects into your current project. You can also copy project items from one project to another.

ClassExplorer

The ClassExplorer makes it easy to navigate through your unit files. It contains a tree diagram showing all the types, classes, properties, methods, global variables, and global routines defined in your unit. You can expand or collapse the nodes on the tree.

New compiler features

New compiler features include templates, template arguments for templates, and language enhancements for both C and C++.

New runtime library features

The new runtime library features and modifications include new IEEE floating-point, thread, and string functions, updates to the Standard C++ Library, and additional MS header files.

Code Insight automatic features

Code Insight enhancements to the Code editor display context-sensitive pop-up windows that contain useful information while you’re writing code.

Dockable tool windows

The IDE (Integrated Development Environment) is more configurable with tool windows that can be docked to the Code editor or to other tool windows. Just drag and drop the tool window to where you want it. The Code editor and Project Manager can also be docked and undocked.

Improved debugging

The Integrated debugger has many new features, including remote and multi-process debugging, breakpoint enhancements, debugger-specific menus, and dockable debug information windows.

MTS support

Explicit support for using MTS is integrated into the multi-tier database support. In addition, a new wizard makes it easy to create MTS server objects.

ActiveX enhancements

C++Builder4 provides expanded ActiveX support.

Microsoft compatibility

C++Builder 4.0 includes new compiler and runtime library features that make it easier to compile and link Microsoft Visual C++ 5.0 project files, workspace, and source files.

You can use the VC++ Conversion wizard to convert Microsoft Visual C++ 5.0 projects into C++Builder projects using the VCTOBPR tool available by choosing Tools|Visual C++ Project Conversion Utility (also available from the command line).

VCL enhancements

The C++Builder object hierarchy has been enhanced to include many new components including a new component for NT Service applications and an action list component. The action list component (on the Standard palette page) lets you centralize the management of menu and tool button commands. Many VCL controls (especially TControl and TWinControl and their descendants) have been enhanced to support drag-and-drop behavior, and provide additional control over window layout (including anchors, constraints, and more). See also VCL information and issues.

VCL support for year-2000 maintenance

The global variable TwoDigitYearCenturyWindow is used by the functions StrToDate and StrToDateTime to control the interpretation of two-digit years when converting dates.

Dynamic arrays

A new DynamicArray template class provides your application with a resizable collection that is binary compatible with the Object Pascal dynamic array type..

CORBA support

The Enterprise version includes support for developing CORBA client and server applications.

Client dataset enhancements

Client datasets now support a wider variety of filter expression, provide support for maintained aggregates, and allow object-relational field types. Improvements make it easier to create datasets for flat-file database applications.

Multi-tiered support

C++Builder 4 gives you more control over multi-tiered applications, including refresh/resync support and more control over what  is included in data packets and how updates are applied. It is now easier to call server interfaces. A new class, TDataSetProvider lets you provide from and resolve to a dataset. Master/detail support is available using nested tables. Enhancements to client datasets makes it easier to pass parameters to an application server or save custom information in data packets.

Package Management

The Package Manager lets you edit, compile, and install package projects. Also new to this release is the Package Collection Editor.

Database enhancements

C++Builder’s data access components have been enhanced to let you adjust your data model while you are building your form or data module. Additions to the data access components and the Borland Database Engine (BDE) let you access the data in new types of database servers, including Access ’97 and new Oracle 8 extensions to SQL (Enterprise edition only), including ADTs (Abstract Data Types), arrays, references, and nested tables. The Visual Query Builder has been replaced by SQL Builder, an all-new intelligent query builder (Enterprise edition only).

Command-line tools

Command-line tool enhancements include new TDUMP features, and new switches for IMPDEF, IMPLIB, and COFF2OMF.


New Project Manager features

See also

The Project Manager includes several new features to simplify managing the files particularly in large applications that contain many files and multiple projects within a project group:

Project activation

Project selector

Drag and drop copying

Copy and paste

Remove button

Project activation

Certain operations, such as commands available on context menus, operate on the active project. The active project is the one that is highlighted in bold in the Project Manager and is the project you are currently working on. The active project is also shown in the project selector.

When you view a project item, such as a form or a code file, the Project Manager automatically makes the project it belongs to the active project.

Project selector

You can easily select a project from the project group using the project selector at the top of the Project Manager. A drop-down list shows all projects in the current project group. The project you select becomes the active project.

Drag and drop copying

You can drag one or more selected items from any other Windows folder and drop them into a project in the Project Manager:

1.	Activate the project where you want the copy to be placed.

2.	In any Windows folder (such as the Windows Explorer or My Computer), select one or more items to copy.

3.	Drag the item or items onto the name of a project in the Project Manager. (The project name is highlighted.)

4.	Drop the items.

You are asked to verify that you want to copy the item or items, and if you click Yes, the items are copied into the active project.

5.	Save the project where you placed the copy.

Copy and paste

You can copy project items from one project to another:

1.	Select the project item you want to copy.

1.	Choose Edit|Copy (or type Ctrl+C).

3.	Select the project where you want to place the copy (or move the cursor where you want to place the copy).

4.	Paste the copy using Edit|Paste (or Ctrl+V).

5.	Save the project where you placed the copy.

Remove button

The Remove button on the Project Manager toolbar removes the item which is selected. If a project is selected and you click on Remove, the whole project including all it contains is deleted from the current project group. If one file is selected, only that file is deleted when you click Remove. Realize that the files are not deleted from disk, only from the current project or group. The Project Manager verifies that you want to remove the project or item before doing so.

Note	If you copy a project item into another then remove the first project without saving the second one, the copied item is removed from the second project as well. The Project Manager prompts you save the project before removing the item. If you save the project when prompted to do so, the copied item is retained.


Database enhancements

Table components have been enhanced to allow you to create, rename, or delete tables from the form designer. Select the table component in the designer, right click, and choose the appropriate command from the context menu. When creating tables, use the collection editor and the object inspector to describe the new table’s fields (FieldDefs property) and indexes (IndexDefs property).

The new Borland Database Engine (BDE) supports Access ’97 and Oracle8.

C++Builder 4 supports new Oracle8 extensions to SQL, including ADTs (Abstract Data Types), arrays, references, and nested tables (Enterprise edition only). New TField types, TADTField, TReferenceField, TDataSetField and TArrayField, support these extensions. The Grid component has been enhanced to support viewing of ADTs and nested tables.


Debugger enhancements overview

C++Builder 4 has many new and improved debugging features, including:

Remote debugging support for EXEs, DLLs, and packages that are built with debug symbols.

Multiple process debugging support for both local and remote processes. The Module view and Thread views are now multi-process aware. They each show all of the processes you loaded along with the threads and modules that belong to each process.

Multievaluator support to provide more accurate debugging information. When debugging code that includes C++ and Pascal DLLs, the debugger will use the C++ evaluator for C++ code and the Pascal evaluator when debugging Pascal code.

Support for distributed debugging.

A Local Variables view selected from the View|Debug Windows menu. The Local Variables window shows the current function’s local variables while in debug mode.

New features on the Run menu include:

Run|Attach to Process command that allows you to debug a process that's already running outside the IDE. Choosing this command displays a list of active processes. Select the one you want to attach to your debugging session.

Run|Run Until Return a command that executes your program until the current routine returns to its caller. This is useful when you've accidentally single-stepped into a routine that you don't need to debug, or when you've determined that the current routine works to your satisfaction and you don't need to single-step through the rest of it.

A new Remote tab for remote debugging on the dialog opened from the Run|Parameters menu.

Menu enhancements to Run|AddBreakpoint, which include distinct new dialogs for address and data breakpoints. The Properties context menu in the Breakpoint List window, the Properties context menu in the CPU view, and the Properties context menu in the Code editor all have new dialogs for adding or modifying breakpoints that are distinct from the Add Breakpoint dialogs.

Other menu additions and changes include:

The debugger now has a complete submenu under Tools|Debugger Options that includes options on the following pages: General, Event log, Language Exceptions, OS Exceptions, and Distributed Debugging.

View|Debug Windows menu now groups all debugger-specific items under a debug windows submenu. This menu includes the CPU window, Event Log, and Local Variables view features mentioned above.

Debug spawned processes option on the General page of the Tools|Debugger Options dialog box. Lets you debug processes spawned by a process you are debugging.

Allow side effects option for Watches.

Breakpoint properties are displayed in a tooltip. Point the cursor at a breakpoint glyph in the gutter of the Code editor. A tooltip is displayed that shows the breakpoint’s pass and condition.


Code Insight automatic features

New automatic features of Code Insight display context-sensitive pop-up windows within the code file. The automatic features are on by default. IYou can turn them off on the Code Insight page of the Tools|Environment Options dialog box.

To enable and configure Code Insight features, use the Environment Options dialog box. Choose Tools|Environment Options and select the Code Insight page.

Code Completion

Code Parameters

Code Browsing

Tooltip Symbol Insight

Code completion

When enabled, the Code Completion dialog box is displayed after you enter a class name followed by a dot (.) or a pointer to an object followed by an arrow (->). The list of properties, methods and events appropriate to the class is displayed. Select the item to be entered in your code.

When you enter an assignment statement and press Ctrl+Spacebar, the list of arguments valid for the variable is displayed. Select an argument to be entered in your code. Similarly, you can bring up a list of arguments when typing a procedure, function, or method call and need to add an argument, or when you are typing an array property (not a genuine array) and you need to type an index expression.

Code parameters

View the required arguments for a method as you enter it into your code. If automatic Code Parameters is enabled, a list box appears when you type a function followed by the opening parenthesis; the syntax for the parameters is displayed. Press Shift+Ctrl+Spacebar to display the list box at any time, whether or not Code Parameters is on automatic.

Code browsing

In the Code editor, hold down the Ctrl key while passing the mouse over the name of any class, variable, property, method, or other identifier. The mouse pointer turns into a hand and the identifier appears highlighted and underlined; click on it, and the Code editor jumps to the declaration of the identifier, opening the source file if necessary. You can do the same thing by right-clicking on an identifier and choosing Find Declaration.

Point the custor at items in the Code editor and a pop-up windows shows you the line number and the file that contains its definition.

Use the navigation buttons in the upper right corner of the Code editor to browse forward and backward through the files you’ve opened.


Tooltip Symbol Insight

Tooltip Symbol Insight displays declaration information for any identifier when you pass the mouse over it in the Code editor. A pop-up window shows the kind of identifier (procedure, function, type, constant, variable, unit, and so forth) and the unit file and line number of its declaration. You can use the Code Browser feature to jump directly to the declaration.


Dockable tool windows

Docking allows you to make full and efficient use of your screen space as you work on your project. From the View menu, you can bring up any tool window and then dock it directly onto the Code editor for use while coding and debugging. You can also dock two or more tool windows together to save screen space while retaining fast one-step access to these tools.

Most tool windows in the IDE are dockable. You can recognize dockable windows because they have

A thinner title bar than the code editor.

A Dockable property on the context menu. Uncheck this property to turn off the drag-and-dock capability of a tool window.

A drag outline that appears when you move the tool window with the mouse.

Note:	If you are moving a window and want to prevent it from docking, press Ctrl while dragging the window. In addition, many windows (such as the Package Manager windows and the Object Inspector) have a context menu command that lets you disable docking.


Docking tool windows onto the Code editor

To dock one or more tool windows onto the Code editor:

1.	Choose the View menu and the name of the tool you want to dock. For example, if you want to dock the breakpoints tool choose View|Debug Windows|Breakpoints.

2.	When the tool window appears onscreen, drag it by clicking on the title bar. When the tool window is over a docking site, its drag outline narrows and changes shape to show how the window would dock.

3.	Release the mouse to dock the tool window.

For example, to dock the Breakpoint List window onto the Code editor, click on the Breakpoint List title bar and drag the rectangle around the Code editor window until the drag outline narrows.

To undock a tool window from the Code editor:

1.	Drag the tool window away from the Code editor by clicking on the title bar. When the tool window is no longer over a docking site, its drag outline widens.

2.	Release the mouse. The tool window becomes a floating window.

For example, to undock the Breakpoint List window from the Code editor, drag the Breakpoint List window away from the Code editor using its title bar. The narrow drag outline widens when you are no longer over a docking.


Docking tool windows together

To dock two or more tool windows together:

1.	Choose the View menu and the names of the tools you want to dock together. For example, to dock together the Call Stack tool and the Watches tool, choose View|Debug Windows|Call Stack then View|Debug Windows|Watches.

2.	When the tool windows appear onscreen, drag one tool window by clicking on its title bar and move it onto the other tool window.

3.	When the drag outline narrows, release the mouse. The two windows dock together.

For example, to dock the Call Stack and Watch List windows together, drag the Watch List over the Call Stack window and drop it when the outline narrows.

4.	To view the hidden windows, click the tab with its name on it. For example, to view the Call Stack window, click the Call Stack.

To undock a tool window from the tabbed tools window:

1.	Choose the window you want to undock by clicking its tab. For example, to undock the Watch list window, click the Watch List tab.

2.	Drag the tool window away from tools window until the drag outline widens and then release the mouse. The tool window becomes a floating window.

For example, to undock the Watch List window from the tools window, drag the Watch List window away from the tools window. The narrow drag outline widens when you are no longer over a tools window docking site.


ActiveX enhancements

C++Builder 4 has many new and improved ActiveX features, including:

The Automation wizard now generates code to support events for any Automation server object.

Data-bound ActiveX controls  communicate with VCL datasets.

{	C++Builder generates event support for Automation objects as well as simple COM objects.

Enhanced client support. The generated ActiveX classes are better integrated with OLE servers.

MTS object support.


VCL enhancements

The C++Builder object hierarchy has been enhanced as follows:

Action Lists let you centralize the response to user commands, providing control over controls that respond to user commands such as menus and buttons.

When developing for Windows NT, you can now create Service applications using TServiceApplication and TService. Two wizards in the New items dialog handle many of the details for you.

Changes to TControl and TWinControl allow you to implement docking support for your application windows.

Changes to TControl allow you to set minimum and maximum height and width values for forms and controls so that your windows maintain the desired appearance.

Anchors let you dynamically manage the placement of controls.

You can now handle the registry using code that also works on INI files, using the new TRegistryIniFile class. A Common ancestor, TCustomIniFile, has another new descendant, TMemIniFile, that lets you ensure that Ini file changes are cached in memory, even when the application runs on NT.

The unit for TParams has changed from dbtables to db in order to accommodate enhanced parameter support in TClientDataSet.

New properties support Mideast locales by supporting text that reads right to left, and vertical scrollbars that appear on the left rather than the right.

Object Pascal dynamic arrays have been implemented in C++. See DynamicArray.

Refer to VCL information and issues for details on additional VCL changes.


Multi-tiered support

C++Builder 4 gives you more control over multi-tiered applications, including

More control over what is included in data packets and how updates are applied.

Master/detail support using nested tables.

Hooks for brokering connections.

Enhancements to client datasets for passing parameters to an application server or saving custom information in data packets.

It is now easier to call server interfaces.

A new class, TDataSetProvider lets you provide from and resolve to a dataset.

A variety of connection components allow client applications to connect to application servers (data brokers).

The socket server now supports callbacks. In addition, a new version of the socket server application (ScktSrvr.exe) can now be run as an NT service. The Service application is ScktSrvc.exe and supports two command-line options: -install (to install the service), and  -uninstall (to uninstall the service). You can right-click its tray icon to configure ScktSrvc.exe.


Package management

C++Builder 4, like C++Builder 3, uses packages to install components and ActiveX controls. The default settings for the location and placement of package files are located in the Tools Environment Library. You can change the default options on the Library page or override the defaults on the Options for individual package projects. The Package Manager lets you edit, compile, and install package projects. Also new to this release is the Package Collection Editor (available from the Tools menu) to enable grouping of packages for distribution.


Connection components

C++Builder components that manage the connection to an application server now have two new common ancestors, TDispatchConnection and TCOMConnection. TDispatchConnection embodies the functionality common to all components that connect to database application servers. It manages the communication with a remote data module once a connection is established. TCOMConnection augments TDispatchConnection with the ability to use COM interfaces.

Applications should use TDCOMConnection (identical to the old TRemoteServer) when connecting to an application server using DCOM. Use TOLEnterpriseConnection when the connection is formed using OLEnterprise. UseTSocketConnection when using Windows sockets.

See Choosing a connections protocol for information on the differences between the different connection protocols.

Note:	While TMIDASConnection and TRemoteServer are retained for backward compatibility, the recommended approach is to use TDCOMConnection, TOLEnterpriseConnection, or TSocketConnection.


Callbacks on socket servers

See also

In C++Builder 3, client applications could register an interface with the application server only when connecting using DCOM or OLEnterprise. In C++Builder 4, this is also supported for connections that use Windows sockets (using TSocketConnection).

To use a callback, the application server’s interface includes a method that accepts a client interface as a parameter. The client application calls this method, passing its own instance of the predefined interface. The application server can then use the interface to call the client application.


RTL support for year-2000 maintenance
VCL support for year-2000 maintenance

The StrToDate and StrToDateTime functions can use a global variable called TwoDigitYearCenturyWindow to control the interpretation of two-digit years. The variable creates a floating “pivot”; two-digit numbers that are less than the pivot are read as years in the next century. For details, see the StrToDate function.

You can use TwoDigitYearCenturyWindow to extend the life of legacy applications that are tied to two-digit-year data entry. But the best solution is to require four-digit input for years.

See Y2K Issues for more Year 2000 information.


Y2K Issues

This section discusses the following Y2K issues:

Century window in Database Explorer and the IDE

TwoDigitYearCenturyWindow variable for RTL

Locate/Lookup methods and dates

TDateTimePicker/COMCTL32.DLL

For additional Y2K information, refer to Inprise’s Year 2000 web site:

http://www.inprise.com/devsupport/y2000/

Century window in Database Explorer and the IDE

The IDE and DBExplorer now default to using a "century window" of 50 years on either side of the current year to determine how to convert 2-digit years in string data into 4-digit years in TDateTime data. This mostly affects the entry of date values into tables using the Data View in the DB/SQL Explorer in the IDE and in the stand alone DBExplorer exe. For a current year of 1998, the century window runs from 1948 (1/1/48) to 2047 (12/31/47).

The "skew" of the century window can be overriden or disabled with special registry key settings for the IDE or DBExplorer. For the IDE, the override key is

HKEY_CURRENTUSER\Software\Borland\CBuilder\4.0\Globals\TwoDigitYearCenturyWindow

A value of zero will disable the century window entirely and revert the IDE to C++Builder 3 date handling: all two digit years would be given the current century (in 1998, 1/1/00 would be read as 1/1/1900). Any nonzero value specifies the century window's origin, as a positive number of years prior to the current year. The default value is 50.

The override key for the stand-alone DBExplorer application is

HKEY_CURRENTUSER\Software\Borland\Database Explorer\2.0\DBXForm\TwoDigitYearCenturyWindow

Note:	If the above-mentioned Registry keys do not already exist, you need to create them, such as using the TRegistry component.

TwoDigitYearCenturyWindow variable for RTL

To make your own C++Builder applications handle 2-digit years more reliably at the millennium, you should initialize the SysUtils global variable TwoDigitYearCenturyWindow to a positive value before this line in your project:

Application->CreateForm()

By making the setting there, it is available as objects are created with their parent forms.

Assigning a value of 50 to TwoDigitYearCenturyWindow should be adequate for most applications.  If your application deals mostly with historical dates, such as birth dates, you may want to bias the century window towards the past with a value of 80 (80 years back, 20 years forward). If your app deals mostly with future dates, such as due dates or expiration dates, you may want to bias the century window towards the future, with a value of 20 (20 years back, 80 years forward).

Locate/Lookup methods and dates

Calling the Locate or Lookup method to find a value in a date field using a date value with a two-digit year, expressed in a string, defaults to 19xx even if TwoDigitYearCenturyWindow is set to 50. For example:

TwoDigitYearCenturyWindow = 50;

Edit1->Text = "1/1/47";

TLocateOptions opts;

if( Table1->Locate("Datefield", Edit1->Text, opts) )

  ...

The problem is that the string is getting converted into a date by the operating system's variant conversion routines instead by the RTL routines. The same problem will occur on any method call or property which takes a variant. Force the RTL function to be used by explicitly converting the date, such as using the StrToDate function. The previous statement becomes:

TLocateOptions opts;

if( Table1->Locate("Datefield", StrToDate(Edit1->Text), opts))

  ...

Note, that with TwoDigitYearCenturyWindow set to 50, a date of 1/1/48 should be considered 1948 (assuming the current year is 1998).

TDateTimePicker/COMCTL32.DLL

TDateTimePicker does not show the year in the edit box when the current date is February 29th (for example, February 29th, 2000). This is due to a problem in the Windows system file COMCTL32.DLL. Workaround: obtain a later version of COMCTL.DLL (this problem has been fixed in version 4.72.3110.1, available with Microsoft Internet Explorer 4.0, SP1).


New compiler features

C++Builder4 includes the following new compiler features.

Language changes

Syntax change for namespaces

Templates

Bit fields

New C language features

New C++ language features

Default alignment


Language changes

The following changes to the C++ language cause your applications to compile with slightly different results than with previous versions of the compiler:

The #pragma pack syntax has been modified.

Two new #pragmas have been added: #pragma alignment and #pragma checkoption.

The address of an inline function is the same in all modules.

For language changes specifically related to templates, see Language changes to templates.


Syntax change for namespaces

In C++Builder 3, including a standard header without the .h (see example below) implied "using namespace". Now, it is necessary to specify the namespace.

C++Builder 3 example:

#include <iostream>

main()

{

 cout << "hello";

 return 0;

}

In C++Builder 4, you need to add the ".h" to the #include statement:

#include <iostream.h>

main()

{

 cout << "hello";

 return 0;

}

Otherwise, you can individually "use" or scope the standard components that you want to call:

#include <iostream>

using std::cout;

main()

{

 cout << "hello";

 return 0;

}

or

#include <iostream>

main()

{

 std::cout << "hello";

 return 0;

}


Templates

Template implementation has been updated to conform to Chapter 14 of the ANSI C++ specification. Among the new template features, the most significant are:

Member template functions and classes

Class template partial specializations

Full support for partial ordering rules

Template template parameters (arguments)

Friend templates

typename template qualifier keyword

Explicit specialization of functions handled correctly

The type of a non-type parameter may be dependent

"template" qualifier keyword

Overloading of template and non-template functions

Explicit instantiation of individual members

Static data members of class templates that use integral constant initializers

Point of instantiation done after enclosing declaration

Providing a partial template argument list when specifying a function template name will cause the remaining template parameters to be deduced from context

Type deduction is now performed according to the standard

Template default argument merging is permitted

Language changes to templates

Language changes to templates are:

The statement template class <ident> should now be written as template <ident>. Refer also to Template type syntax change.

An unqualified friend function declaration will never refer to a template specialization. If a template specialization reference is desired, either qualify the name, or use explicit template arguments to reference the function.

A template body is instantiated directly after the declaration that references it. In C++Builder 3, all instantiations were performed at the end of the file.

The -J family of switches has changed:

-Jg is no longer provided but –Jgd (the default) works the same (smart templates)

-Jgx can be used when you don’t want to instantiate template bodies

Turning –Jgx on turns –Jgd off and vice versa.

Redefined default arguments in template function parameters now generate a redefinition error.


Bit fields

Bit fields in C++ can now be declared with a width of any constant integer size.


New C language features

Anonymous structures are now supported in both C and C++.

Anonymous unions, previously supported only in C++, are now also supported in C.

Inline functions, previously supported only in C++ using the inline keyword, are now supported in C by using the __inline keyword. __inline is also supported in C++.


New C++ language features

__try, previously supported only in C, is now also supported in C++.

try, is still a C++ only keyword.

Anonymous structures are now supported in both C and C++.


Default alignment (-a1 -a2 -a4 -a8)

The compiler's default data alignment has changed from 4 bytes in C++Builder 3 to 8 bytes in C++Builder 4 for Microsoft compatibility. This change does not affect VCL code, which is guarded to use 4-byte alignment.

Because the compiler's default data alignment has changed from 4 to 8 bytes, this section provides details on data alignment and potential impacts on your C++Builder applications.

What is data alignment?

Setting data alignment affects the size and placement of the data members of structures and classes. Thus, if a pointer to a structure is passed to a DLL or another OBJ that has been compiled with a different data alignment, the destination code could be referencing incorrect locations in the struct or class for data. This can lead to strange behavior when the program is executed or potentially cause it to crash. The problems caused by having mismatched data alignment are commonly hard to track down. For example:

struct test {

   long double ld1; //ten bytes

   long double ld2; //ten bytes

}t;

Compiled with -a4: t.ld1 resides in bytes 0 through 9 of t, t.ld2 resides in bytes 12 through 21. Because the structure needs to be padded with empty bytes for 4-byte alignment, sizeof(struct test) = 24.

Compiled with -a8: t.ld1 resides in bytes 0 through 9 of t, t.ld2 resides in bytes 16 through 25. Because the structure needs to be padded with empty bytes for 8-byte alignment, sizeof(struct test) = 32.

If a pointer to a struct test that had been compiled with -a4 was passed to a function that was compiled with -a8, the destination pointer ptr->ld2 would be looking for ld2 at bytes 16 through 25 instead of where ld2 really resided in the calling location - at bytes 12 through 21.

What is the difference between the C++Builder 3 IDE and the C++Builder 4 IDE?

The C++Builder 3 IDE did not specify -a4 in project makefiles since at the time it was the default data alignment setting for the compiler. The C++Builder 4 IDE will always specify a data alignment option in project makefiles. So, when the C++Builder 4 IDE updates a C++Builder 3 project with no -aN data alignment option, the C++Builder 4 IDE assumes the new default of 8-byte data alignment. Thus -a8 will be placed in with the other compiler options in the updated project makefile.

What to do if your C++Builder 3 project was using 4-byte alignment

Option 1: Rebuild all the DLLs, BPLs, LIBs, and OBJs in your project using the new alignment setting. This should work unless somewhere some code explicitly references data in structures or classes assuming the data is starting at a particular offset from the beginning of the struct or class.

Option 2: Wrap the -a4 functions and data with one of the following:

#pragma option

or

#pragma pack

pragma to isolate a section of code to be compiled with a specific data alignment.


New CMD-line tool features

The following command-line tools have new features:

New TDUMP features

New IMPDEF and IMPLIB switches

New COFF2OMF switches


New TDUMP features

To view the list of command-line switches to the TDUMP utility, run TDUMP without any parameters. The list now displays in two columns, instead of one, to ensure that all of the switches are visible at once. To display this list in one long column, run:

TDUMP -?

at the command line.

The following new switches have been added:

Switch	Meaning

-ea[:v]	Dump Exports(:v sort on RVA)

-le[=x]	Dump EXPDEF recs (x=srch)

-ep	No EXE PE header display

-s[=x]	Dump strings (x=srch)

-su[=x]	Dump Unix-style strings. (no offsets)

-?	Display a help screen in a single column

The –um switch has been improved. You no longer have to reformat the text beforehand. You can now pass output that that has mangled names anywhere in the text, and only the mangled names will be affected (unmangled).

For a complete list of TDUMP switches, refer to the TDUMP help or run TDUMP at the command-line.


New IMPDEF and IMPLIB features

IMPLIB and IMPDEF each have the new –a switch for compatibility with Microsoft libraries.


New COFF2OMF features

The following new switches have been added to the COFF2OMF command-line tool for flexibility when working with either Microsoft or non-Microsoft libraries:

-lib:xx Specify options for OMF import library generation:

xx can be:

ms - Allow entries that have MS C++ name mangling (default: no)

st - Normalize names instead of aliasing MS stdcall mangling

ca - Don't perform MS cdecl aliasing (default is to alias)

Refer to the Help on COFF2OMF, or run COFF2OMF at the command line, to view the complete list of switches.


New RTL features
New runtime library features

The new RTL features, changes, enhancements, and modifications for C++Builder  are:

New RTL functions

Updates to the Standard Template Library

New MS header files

Thread-local storage enhancements


New runtime library functions

The following is a list of categories for the new RTL functions. Within each category, functions with links are documented; those without links are not yet documented, but are implemented for field test one. The categories are:

New string functions (including new TCHAR.H functions)

New IEEE floating-point functions

New thread functionality

New WideChar and 64-bit Findxxxx functions

New multi-byte and miscellaneous functions


New IEEE floating-point functions

The following is a list of new IEEE floating-point functions:

_chgsign

_chgsignl

_clearfp

_controlfp

_copysign

_copysignl

_finite

_finitel

_fpclass

_fpclassl

_isnan

_isnanl

_logb

_logbl

_nextafter

_nextafterl

_scalb

_scalbl

_statusfp


New thread functionality

The following is a list of new, Microsoft compatible, thread functions:

_beginthreadex

_endthreadex

_adopt_thread

_unadopt_thread


New string functions

See also

The .snprintf. series of functions is new in C++Builder. Compared with the normal .sprintf. functions, these functions take an additional size_t parameter which indicates the maximum number of characters to write into the output buffer. If there is not enough space to write the entire formatted string, output ceases at the limit and the terminating null character is NOT appended, otherwise it is.

Return values:

The C9X versions always return the total number of characters (not including the terminating ‘\0’ character) that could be written if the buffer were of an unlimited length. In other words, the specified size of the buffer will never be written beyond no matter what, but the return value will always indicate the minimum buffer size needed to successfully write the entire string into it.

The MSC versions will return the number of characters written (minus the terminating ‘\0’ character) if there is enough space, otherwise they return -1.

The TCHAR macro names are declared in the tchar.h header file.

TCHAR macro name	Narrow name	Wide name	Spec. Information

_sntprintf	snprintf	snwprintf	C9X compliant version

_vsntprintf	vsnprintf	vsnwprintf	C9X compliant version

__sntprintf	_snprintf	_snwprintf	MSC compliant version

__vsntprintf	_vsnprintf	_vsnwprintf	MSC compliant version


Updates to the Standard Template Library

The latest 2.02 version of the RogueWave Standard Template Library (STL) ships with C++Builder 4.0. Users are encouraged to use the new STL (which includes many bug fixes) by recompiling previous code written in C++Builder 3.0.

The Extensions section of the Rogue Wave online documentation describes how the RogueWave implementation of the standard iostreams differs from the ISO/ANSI Standard C++ Library specification. Use the browse sequence to navigate through this information, which includes RogueWave’s extensions to the standard iostreams.


New MS header files

Four hundred additional Microsoft Windows header files and import libraries have been added to C++Builder. (C++Builder 3.0 had about two hundred.) Most of the new files are from the platform SDK. Field testers are encouraged to use as many of the new headers as possible. Compatibility testing with C++Builder 3.0 is especially important, based upon whether or not the new 8-byte alignment is implemented.


Thread-local storage enhancements

Thread-local storage to has been extended and is now unlimited (the previous limit was 23-24).

This change to thread-local storage means that dynamic RTL (the RTL DLL) will use only one TLS slot per process instead of one per PE module. So, EXEs and DLLs (including packages) that link to the RTL DLL will not incur more than one slot. Users, however, must link DLLs and EXEs to the RTL DLL to reap the benefits of this change.

Note: Pascal-built DLLs use additional slots for thread-local variables (threadvar). And Pascal-built DLLs use MS DLLs, which use additional slots.


New WideChar and 64-bit functions
New WideChar and 64-bit Findxxxx functions

The following are lists of new, Microsoft compatible findfirst/findnext routines:

_findclose

Using the Microsoft C _finddata_t struct:

_findfirst

_findnext

Using the Microsoft C _wfinddata_t struct):

__wfindfirst

__wfindnext

64-bit using the Microsoft C _finddata_t struct

_findfirsti64

_findnexti64

64-bit using the Microsoft C _wfinddata_t struct

_wfindfirsti64

_wfindnexti64


New multi-byte and miscellaneous functions

__iscsym

__iscsymf


Upgrading to C++Builder 4

The following topic describes changes specific to upgrading C++Builder 3 projects to C++Builder 4:

Upgrading projects to C++Builder 4

The following topics concern upgrading from C++Builder 1 or Borland C++. Note that some of the issues discussed may still be relevant.

Upgrading from Borland C++ or C++Builder 1

This topic covers upgrading issues that are relevant for previous users of Borland C++ 5.02 or previous releases of C++Builder.

Changes from C++Builder 1 to 3

This topic specifically discusses changes that took place from C++Builder 1 to C++Builder 3.

Upgrading from Borland C++ 5.02 to C++Builder 4

This topic covers a variety of conceptual and compatibility issues specifically targeted to users who are new to the C++Builder environment, and who have not previously programmed with the VCL.


Upgrading projects to C++Builder 4

When you load a C++Builder 3 project into C++Builder 4, the makefile is automatically updated and library files are added to the LIB line. The following topics describe changes that could potentially impact existing C++Builder projects:

Compiler changes

Runtime library changes

VCL information and issues

Refer also to the What’s new overview for information on additional language changes that could potentially impact your applications.


Makefile changes

See also

Makefiles (project.BPR files) are automatically updated when you bring a C++Builder 3 program into C++Builder 4. This topic describes some of the changes to the makefile format implemented as of this release.

Note: Only advanced programmers ever need to directly edit the makefile in a C++Builder project. C++Builder generates and keeps the .BPR or makefile up to date as you work in the development environment.

The following changes were made to the makefile (.BPR) file format:

CFLAGS2 and CFLAGS3 values are now combined with CFLAGS1 in CFLAGS

IFLAGS are no longer used

DEFINES are now divided into two sections: SYSDEFINES and USERDEFINES.

SYSDEFINES includes all DEFINES that the IDE sets as a result of choosing some compiler or linker options in the IDE. These values can no longer be edited on the Directories/Conditionals page of the Project Options dialog box.

USERDEFINES includes all DEFINES that you type into the Directories/Conditionals page of the Project Options dialog box.

IDLFLAGS were added for CORBA support.


Compiler changes

See also

Compiler changes include new language features, and changes to bit fields and namespaces. New compiler features provides links to the details.

The compiler's default data alignment has changed from 4 bytes in C++Builder 3 to 8 bytes in C++Builder 4. For details, see Default alignment (-a1 -a2 -a4 -a8).

The compiler now defaults to the single-threading model (-tWM-) instead of the multi-threading model (-tWM). The IDE will specify -tWM for you in all project makefiles it generates. This change mostly affects programmers that use the command line compiler, bcc32.exe.

C++Builder 4’s template implementation now conforms to Chapter 14 of the ANSI C++ specification. If using templates in your code, object files (.OBJs) and libraries (.LIBs) from C++Builder 3 are not compatible with C++Builder 4. Therefore, you must recompile any OBJs and LIBs from C++Builder 3 that you want to link to C++Builder 4 code. This is only necessary if using templates. Refer to Templates and Template type syntax change.

Jg command-line switch

The -Jgd compiler switch (the default) now behaves like the former -Jg switch. -Jg is no longer supported. Note that turning on -Jgx turns off -Jgd and vice versa.

-s compiler switch

TLINK32 is no longer included with the product. The -s compiler switch has been disabled.


Template type syntax change

In C++Builder 3, a template type could be created as shown in the following example:

//Declare a Set<> template and

//create a type of that template

enum TDlgAttr { daNothing, daMultPg, daBtnsH, daBtnsV };

typedef Set<TDlgAttr, daNothing, daBtnsV>  TDlgAttrs;

//Template instantiations

template class TDlgAttrs ;

//end unit

In C++Builder 4, the template instantiation omits the keyword class:

//Template instantiations

template TDlgAttrs ;

//end unit


Runtime library changes

The RogueWave Standard Template Library (STL) version 2.02 ships with C++Builder 4. You are encouraged to recompile code from C++Builder 3 which included an earlier version of the STL.

Refer to New Runtime library features for links to information on new runtime library features including new IEEE floating-point, thread, and string functions, updates to the Standard C++ Library, and additional Microsoft header files.

Note the following issue when using auto_ptr.

auto_ptr

If you use auto_ptr in memory.h in a C++Builder 3 program, you may see the following error in C++Builder 4:

Could not find a match for 'auto_ptr<char>::operator=(auto_ptr<char>)'.

For example:

auto_ptr<char> recBuf;

recBuf = auto_ptr<char>(new char[10]);

No operator= in auto_ptr takes a const reference, nor does the standard specify one. This is because operator= in auto_ptr specifically changes the value of the right side, so it requires an lvalue there.


VCL information and issues

The following methods and global routines now have additional parameters. Compiling existing code that contains these items produces compiler errors in C++Builder 4. You need to add the new parameters to the code and (if applicable) set the value for backward compatibility, then recompile.

TControl::BeginDrag

TFieldDef::CreateField

TFieldDef::TFieldDef

TClientDataSet::AddIndex

TClientDataSet::CloneCursor

TClientDataSet::GetIndexInfo

TClientDataSet::LoadFromFile

TClientDataSet::SaveToFile

TTable::AddIndex

DatabaseError

DatabaseErrorFmt

TIMemoryStream

TCustomImageList::Draw

TMidasConnection case changes

The following changes and issues concern use of VCL objects in C++Builder applications:

Setting the OldCreateOrder property

Fields index type changes

Property assignment expressions

Variants


TControl::BeginDrag changes

New parameter: int Threshold

Value for Backward Compatibility:

int Threshold = 1

New syntax:

void __fastcall BeginDrag(bool Immediate, int Threshold);


TFieldDef::CreateField changes

New parameters: TObjectField* ParentField, const AnsiString FieldName, bool CreateChildren

Values for Backward Compatibility:

TObjectField* ParentField = null

const AnsiString FieldName = " "

bool CreateChildren = true

New syntax:

TField* __fastcall CreateField(Classes::TComponent* Owner,

TObjectField* ParentField, const AnsiString FieldName,

bool CreateChildren);


TClientDataSet::AddIndex changes

New parameters: AnsiString DescFields, AnsiString CaseInsFields, int GroupingLevel

Values for Backward Compatibility:

AnsiString DescFields = " "

AnsiString CaseInsFields = " "

int GroupingLevel = 0

New syntax:

void __fastcall AddIndex(const System::AnsiString Name,

const System::AnsiString Fields, Db::TIndexOptionsOptions,

const System::AnsiString DescFields,

const System::AnsiString CaseInsFields,

const int GroupingLevel);


TClientDataSet::CloneCursor changes

New parameter: bool KeepSettings

Value for Backward Compatibility:

bool KeepSettings = False

New syntax:

void __fastcall CloneCursor(TClientDataSet* Source,

bool Reset, bool KeepSettings);


TClientDataSet::GetIndexInfo changes

New parameter: AnsiString IndexName

Value for Backward Compatibility:

System::AnsiString FileName = " "

New syntax:

void __fastcall GetIndexInfo(System::AnsiString IndexName);


TClientDataSet::LoadFromFile changes

New parameter: const AnsiString FileName

Value for Backward Compatibility:

const System::AnsiString FileName = " "

New syntax:

void __fastcall LoadFromFile(const System::AnsiString FileName);


TClientDataSet::SaveToFile changes

New parameter: const AnsiString FileName

Value for Backward Compatibility:

const System::AnsiString FileName = " "

New syntax:

void __fastcall SaveToFile(const System::AnsiString FileName);


TTable::AddIndex changes

New parameter: const AnsiString DescFields

Value for Backward Compatibility:

const AnsiString DescFields = " "

New syntax:

void __fastcall AddIndex(const AnsiString Name,

const AnsiString Fields, Db::TIndexOptions Options,

const AnsiString DescFields);


DatabaseError changes

New parameter: TComponent* Component

Value for Backward Compatibility:

TComponent* Component = null

New syntax:

extern PACKAGE void __fastcall DatabaseError(const AnsiString

Message Classes::TComponent* Component);


DatabaseErrorFmt changes

New parameter: TComponent* Component

Value for Backward Compatibility:

TComponent* Component = null

New syntax:

extern PACKAGE void __fastcall DatabaseErrorFmt(const AnsiString

Message, const System::TVarRec* Args, const int Args_Size,

Classes::TComponent* Component);


TIMemoryStream changes

Old syntax

__fastcall TIMemoryStream(Classes::TMemoryStream* Stream);

New syntax

__fastcall TIMemoryStream(Classes::TMemoryStream* Stream, Classes::TStreamOwnership Ownership);


TCustomImageList::Draw changes

Old syntax

void __fastcall Draw(Graphics::TCanvas* Canvas, int X, int Y, int Index);

New syntax

void __fastcall Draw(Graphics::TCanvas* Canvas, int X, int Y, int Index, bool Enabled);


TFieldDef::TFieldDef changes

The constructor for TFieldDef has changed:

Old syntax

__fastcall virtual TFieldDef(Classes::TCollection* Collection)

 : Db::TNamedItem(Collection) { }

New syntax

__fastcall TFieldDef(TFieldDefs* Owner, const AnsiString Name,

 TFieldType DataType, Word Size, bool Required, int FieldNo);

Note: You should be using the AddField method of TFieldDefs to create field definitions, not the FieldDef constructor.


TMidasConnection case changes

The case of the namespace in vcl\MIDASCon.hpp and the declared class name TMIDASConnection has changed.

Previous

MIDASCon -- TMIDASConnection

New

MidasCon -- TMidasConnection


Setting the OldCreateOrder property

The TCustomForm::OldCreateOrder property was added. You may need to explicitly set this form property to false in existing C++Builder 3 programs that use OnCreate or OnDestroy.

For example, you could see this if (in error) a String variable is set to NULL before the form's destroy handler is called. A program might set a String to a file name in an OnCreate and then save text to that file in an OnDestroy. In the OnDestroy handler, the contents of the String would be gone unless the OldCreateOrder property were set to false.


Fields index type changes

The Fields property of datasets has changed to better support multiple levels of nested datasets. The property Fields[int index] is now in the TFields object. TFields has a Fields property that is an indexed array of TField objects. It used to be defined further down in other objects, such as TQuery, TDataset, and so on.

Therefore, code such as the following:

TheFieldName = MyQuery->Fields[0]->FieldName;

must be changed to:

TheFieldName = MyQuery->Fields->Fields[0]->FieldName;

Otherwise, you will receive the following error:

Pointer to structure required on left side of -> or ->*


Property assignment expressions

Any property assignment should only take the form:

PROPERTY = VALUE;

Using complex property assignments, for example:

AnsiString caption = (Form1->Caption = "Hello");

can cause ambiguous results for the compiler and can result in an error.


Variants

If you have a VCL variant, Variant, and need to pass it to an Automation Object expecting a TVariant, you'll need to use the VARIANT conversion operator. The same applies in the other direction. For example,

VclFunction(const Variant& varParam);

OleServer(TVariant var);

Variant vclV;

TVariant tV;

VclFunction(VARIANT(tV));

OleServer(VARIANT(vclV));


Upgrading from Borland C++ or C++Builder 1

The topics concern upgrading from either Borland C++ 5.0X or C++Builder 1:

Changes to OBJ files

IO stream updates to C++Builder 3s

IO stream operator changes for C++Builder 3


Changes with OBJ files
Changes to OBJ files

C++Builder 4 is not object file compatible with C++Builder 1 or any previous Borland C++ compiler. Object code and library modules originally compiled using another Borland C++ compiler must be recompiled with C++Builder 4 before they can be linked into an C++Builder 4 application.


IOstream updates to C++Builder 3

The following are changes in the C++ Standard Library were included in C++Builder 3:

Templates

Explicit specialization requires the declarator "template<>" if "-A" is enabled.

I/O Streams

istream_iterator now takes a second argument, which specifies the  base type of the istream. For example, "istream_iterator<int, char>".

Algorithms

“accumulate" is now located in <numeric>, instead of <algorith>.

"times", in <function>, is now called "multiplies".

Exception handling

The "xmsg" class still exists, but is deprecated (and marked obsolete). Use the "exception" class (or something derived from it) instead.

"string" class

The STL "string" class is now accessed by doing #include <string>. #include <string.h> and #include <cstring> both bring in the "C" string functions (like strlen, strcpy, strcmp,...) and #include <cstring.h> will still provide the new STL string class (for backwards compatibility).

The "illegal position" character for the "string" class is now "string::npos", and not NPOS. For example:

if (string().find("mytext") != string::npos) { ... }

"string::remove()" has been renamed to "string::erase()"

"string::is_null()" no longer exists. Use "string::empty()" instead.


IO stream operators
IOstream operator changes for C++Builder 3

Insertion/extraction operators of VCL classes are not visible unless a macro, VCL_IOSTREAM, is defined.

If you are upgrading from C++Builder 1, VCL previously included iostream.h. It does not automatically include it now. If you need to include the insertion/extraction operators of the VCL classes, old code that relied on VCL bringing in iostream.h, or that utilized the insertion/extraction operators of VCL classes, must now define VCL_IOSTREAM.

This issue concerns only the C++ classes, declared in the following header files. These classes were created to support the Delphi built-in language types, such as Currency, Variant, and AnsiString.

sysdefs.h

wstring.h

dstring.h

Because vcl.h includes these header files, this issue also applies to vcl.h.


Upgrading from C++Builder 1 to 3
Changes from C++Builder 1 to 3

Topics:

Changes with the VCL lib files for ActiveX

Updating C++Builder 1 projects

Updating C++Builder 1 makefiles

Incompatibilities with C++Builder 1


Changes with VCL lib files
Changes with the VCL lib files

For ActiveX controllers written in C++Builder 1, if you used OleAuto or ComObj you will need to manually link in the OBJs for these files. These units were updated in C++Builder 3 to Ole2 and ActiveX. The old files are not automatically included because of name conflicts.

If you wrote an ActiveX server in C++Builder using these files, you will need to rewrite it to reflect the updated classes in the new units.


Updating C++Builder 1 projects

When you load an old project the makefile is automatically updated and lib files are added to the lib line. Note that these updates apply only to projects and not to specific files. For more information on updating old applications to use packages, see About Packages.

It is recommended that you manually add the PACKAGE keyword both as a class modifier in the C++Builder-1-generated header and to the “extern” of the form for the following situations:

If you plan to add your form to a package

If you use the IDE option to add a file to a project

If you both USE and #include a C++Builder-1-generated form


Updating makefiles
Updating C++Builder 1 makefiles

Various changes and additions were made to the parts of the makefile that are used when building from the command line using MAKE. The makefile will still work when it's converted. However, if you are using features (such as intermediate output directory, new compiler options, and new linker options), the easiest approach is to update the makefile by replacing the static section of the C++Builder 1 makefile with the static section from a C++Builder 4 project.

Comments were added to the generated makefile to mark the 'static' (non-IDE-managed) section. The static section of a C++Builder 1 project is everything below the .autodepend directive. So you can cut and paste from the C++Builder 4 section to the C++Builder 1 section of the makefile.

This does not affect users who build projects in the IDE. Even from the command-line, the application will build correctly, as long as you do not use the new features mentioned above. If you do, the build will either fail (setting an intermediate output path) or will not have the same result as an IDE build (using the new compiler/linker options).


Incompatibilities
Incompatibilities with C++Builder 1

1.	Tools API from C++Builder 1 doesn't work in C++Builder 4.

2.	C++Builder 1 programs that used the internet controls, do not run because of the vendor change. You need to install the C++Builder 1 Netmanage controls in C++Builder 4 to use them.

3.	You must #include stdio.h when using functions like sprintf.

4.	Sample components, such as TCalendar, have changed class names. See the Samples tab on the Component palette for the latest samples.

1.	You cannot pass controls from a DLL when trying to reassign their parent to the .EXE.

6.	Any component from C++Builder 1 must be recompiled as a package to be installed in later versions of C++Builder. For more information, see About Packages.


Upgrading from C++ 5.02 to C++Builder 4
Upgrading from Borland C++ 5.02 to C++Builder 4

Converting IDE projects to BPR projects

OWL upgrade issues


Converting IDE project files to BPR project files

To open any Borland C++ 5.0x, OWL, or MFC application in C++Builder 4, use the utility idetobpr. Idetobpr is a command-line utility that converts the Borland C++  IDE project files (.ide files), created in Borland C++ 4.x or 5.0x, to C++Builder .BPR project files (.BPR files) that can be opened in the C++Builder 4.0 IDE.

syntax:

idetobpr [-v] [filename].ide

The -v option causes the generated .bpr file to specify linkage to the non-VCL-enabled versions of the RTL/OWL/BIDS libraries.

For each target in an .ide file, one .bpr file is created. For .ide files with multiple targets, a .bpg file which calls all .bpr files is also created.

When an .ide file is processed, Idetobpr looks for a .cpp file by the same name as the .ide file. In that file, the following lines are added to enable the C++Builder 4 Project Manager to load the project.

  #include <condefs.h>

  USEUNIT("<dependent .cpp filename>")

  USERC("<dependent .rc filename>")

  #define WinMain        <---- this will be DllEntryPoint for DLLs

If a .cpp file the same name as the .ide file is not found, one is created.

When converting .ide files, Idetobpr converts the library names as follows if -v is not specified:

C++ 5.02 File	Description	Converts to C++Builder File

owlwf	OWL static	owlwv

owlwfi	OWL dynamic	owlwvi

owlwt 	OWL multithreaded static	owlwv

owlwti	OWL multithreaded dynamic	owlwvi

owldwf	OWL static diagnostic	oldwv

owldwfi	OWL dynamic diagnostic	owldwvi

owldwt	OWL multithreaded static diag	owldwv

owldwti	OWL multithreaded dynamic diag	owldwvi

bidsf	BIDS static	bidsv

bidsfi	BIDS dynamic	bidsvi

bidst	BIDS multithreaded static	bidsv

bidsti	BIDS multithreaded dynamic	bidsvi

bidsdf	BIDS static diagnostic	bidsdv

bidsdfi	BIDS dynamic diagnostic	bidsdvi

bidsdt	BIDS multithreaded static diagnostic	bidsdv

bidsdti	BIDS multithreaded dynamic diagnostic	bidsdvi

cw32	RTL static	cp32mt

cw32i	RTL dynamic	cp32mti

cw32mt	RTL multithreaded static	cp32mt

cw32mti	RTL multithreaded dynamic	cp32mti

vcl	VCL static	vcl40 vcldb40

vcld	VCL debug	vcl40 vcldb40

nafxcw	MFC static	nafxcw

nafxcwd	MFC static diagnostic	nafxcwd

bfcs??	MFC static part of DLL	bfcs42

bfcs??d	MFC static part of DLL diagnostic	bfcs42d

bfc??	MFC dynamic	bfc42

bfc??d	MFC dynamic diagnostic	bfc42d

bfco??d	MFC OLE DLL diagnostic	bfco42d

bfcd??d	MFC Database DLL diagnostic	bfcd42d

bfcn??d	MFC Internet DLL diagnostic	bfcn42d

If -v is specified, only the MFC and VCL library names are updated to their latest names. In addition, _NO_VCL is added to the list of macro defines for the project.

If in the .ide file, Include and Library paths (for -I and -L options) which contain $env(BCROOT) or BC5 are changed to contain $(BCB) instead. .IDE files for OWL or BIDS projects result in "include\obsolete" appended to the path in the .bpr file.

.IDE files for MFC projects have _MSC_VER=1100 prepended to the list of macro defines.


OWL;upgrading, OWL
OWL upgrade issues

Installing OWL

Modifications to OWL, OCF, and BIDS


Installing OWL

Files needed to support OWL and MFC are included in the install program. The required files are installed with a "Full" option and are not installed with the "Compact" option. The user can select either MFC or OWL support through the "Custom" option and will get Include, Lib and Example files.

The source files are only on the CD run image, and are never installed.

The files are installed to <BCB>\Include\Obsolete, and <BCB>\Examples\Obsolete and <BCB>\Lib.


Modifications to OWL, OCF, and BIDS

The following issues affect OWL/OCF/BIDS users:

$(BCB)\include\obsolete needs to be added to the compiler's include path. VCL and OWL headers cannot currently be included in the same translation unit.

In <clsslib/objstrm.h>: the macro _TYPENAME has been renamed _OBJ_TYPENAME to avoid a clash with like-named define added to the RTL headers.

In <ocf/autodefs.h>: TAutoString::TAutoString(TAutoVal) is now an explicit constructor to avoid ambiguity problems that the compiler never caught before. This is unlikely to affect user code.

The string constructor "string::string(HINSTANCE, UINT, int)" was removed. existing code can use the class TResString in <services/cstring.h> instead. TResString is derived from string, and can be used just about anywhere that string was used previously.

string errmsg(*GetModule(), IDS_ERRMSG);  // error: no match

TResString errmsg(*GetModule(), IDS_ERRMSG); // ok.

If you compile with _OWLTMPLEXT, compile time and object file size will drop dramatically. This macro will instruct the compiler not to generate instantiations for any templates defined in <string>, <iostream>, or <fstream>. the RTL will provide the following instantiations:

basic_string<char, char_traits<char>, allocator<char> >;

basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;

basic_istream<char, char_traits<char> >;

basic_istream<wchar_t, char_traits<wchar_t> >;

basic_ostream<char, char_traits<char> >;

basic_ostream<wchar_t, char_traits<wchar_t> >;

basic_ifstream<char, char_traits<char> >;

basic_ifstream<wchar_t, char_traits<wchar_t> >;

basic_ofstream<char, char_traits<char> >;

basic_ofstream<wchar_t, char_traits<wchar_t> >;

If your code requires any other variations of these templates, you will need to either not use _OWLTMPLEXT or request an explicit instantiaton:

template class basic_string<char, char_traits<char>, my_allocator<char> >;

OWL, OCF, and BIDS are now compiled into the namespaces Owl, Ocf, and ClassLib, respectively.