Release Notes for Delphi® 2007 for Win32® and C++Builder® 2007
By: Dee Elling
Abstract: This file contains important supplementary information that might not appear in the main product documentation. CodeGear recommends that you read this file in its entirety.
This file contains important supplementary information that might not appear in the main product documentation. CodeGear recommends that you read this file in its entirety.
This document refers to "the product" when the information applies to both Delphi 2007 for Win32 and C++Builder 2007.
For information about installation, deployment, and licensing issues, see the Install, Deploy, and License files located, by default, at C:\Program Files\CodeGear\RAD Studio\5.0.
Before installing, uninstalling, or upgrading the product, see the INSTALL and LICENSE files for detailed information about installation and licensing issues. These two files are located by default at:
C:\Program Files\CodeGear\RAD Studio\5.0\install.htm C:\Program Files\CodeGear\RAD Studio\5.0\license.rtf
For example, the install.htm file gives the free space requirement for installing C++Builder.
Installing products in the wrong order can cause problems and should be avoided. For example:
Exception EPackageRegistrationException in module coreide100.bpl at 000DB245. Registration procedure, Cppproject.IDERegister in package C:\Program Files\Borland\BDS\4.0\Bin\bcbide100.bpl raised exception class EOleSysError: OLE error 80131040, ClassID: {F8FEDD39-E3CE-4B8D-A657-9CA24686881F}
In this case, the assembly is registered incorrectly in the BDS2006 install. If .NET 2.0 and .NET 1.1 coexist on the system, the system cannot load borland.studio.toolsets.dll. The workaround involves forcing the assembly loader to use .NET 1.1 for this assembly. For more information, see:
http://qc.codegear.com/wc/qcmain.aspx?d=28728
http://qc.borland.com/wc/qcmain.aspx?d=22108
http://support.codegear.com/article/36047
Do not install Delphi 2007 for Win32 from an original release DVD (prior to Update 1) after you install C++Builder 2007. The result is that neither product gets installed. Instead, select Start | Programs | RAD Studio | Modify, Repair, Uninstall; select Upgrade, enter your Delphi serial number, and continue through the steps in the installer to install Delphi 2007 for Win32 Update 1.
The installer does not warn you when there is not enough free space to install the product. Approximately 2 GB of free space is needed on the C: drive to install C++Builder (even if you are installing to a different drive). If there is insufficient space, the installer might hang.
After uninstalling Delphi 2007, some system files/settings are removed and prevent any subsequent .NET 2.0 uninstall or repair until you reboot.
Top
Select Component>Install Packages.
Add "indy;" at the beginning of the runtime packages list, as follows:
indy;vcl;rtl;bcbie;vclx;vclactnband;xmlrtl;bcbsmp;dbrtl;vcldb;bdertl;vcldbx;dsnap;dsnapcon;teeUI;tee;teedb;vclib;ibxpress;adortl; dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;inet;IntrawebDB_90_100;Intraweb_90_100;VclSmp;vclie;websnap;webdsnap;inetdbbde;inetdbxpress;soaprtl
This applies to both products.
Software\Borland\BDS\5.0\Globals
Add (or update if it already exists) a string value called ForceEnvOptionsUpdate. Assign it a string value of "1." When this registry key has a value of "1," the next time the IDE runs, it updates the EnvOptions.proj file on disk to include the path(s) that your installer added. The EnvOptions.proj file is the mechanism by which the new MSBuild build engine in the IDE is able to include paths that are listed on the Library - Win32 page in the IDE's Tools>Options dialog.
If your installer updates any of the following registry keys, it should also add or update the Globals\ForceEnvOptionsUpdate key:
The legacy WinHelp viewer (WinHelp.exe) is not implicitly registered by RAD Studio. If you want to use .HLP files from an application, you need to add the WinHelp viewer to the uses list of any unit included in the application.
To download the WinHelp viewer, visit the Microsoft website: http://www.microsoft.com/downloads/details.aspx?familyid=6ebcfad9-d3f5-4365-8070-334cd175d4bb.
If you dynamically load a DLL, you can't link dynamically with the runtime library. Otherwise, an Access Violation occurs when the program terminates. The workaround is to not check Dynamic RTL in the Linking section in Project Options on the Linker\Linking page.
The C++ library GdiPlus cannot be used in non STRICT mode, since it requires that Graphics::Graphics(HDC) be distinguishable from Graphics::Graphics(HWND). In non STRICT mode, both HWND and HDC are "void*". Otherwise, you get the error: [C++ Error] GdiplusGraphics.h(37): E2015 Ambiguity between 'Gdiplus::Graphics::Graphics(void *)' and 'Gdiplus::Graphics::Graphics(void *,int)'
The C++ runtime libraries have been enhanced and altered to be more current, and the standard C++ libraries from Dinkumware have been updated to 5.01. Because of these changes, the binary objects generated by the compiler in C++Builder 2007 might differ in some cases from previously compiled versions. The incompatibilities are mainly restricted to the C++ standard libraries. There are no changes in the basic C++ application binary interface (ABI).
The Delphi compiler (DCC32) previously generated the following code in the .hpp file when an interface parameter had the default value of nil:
void methodName(_di_IIntf param = (void *)(0x0));
Previously the C++ compiler incorrectly accepted this syntax.
In this release, both the Delphi compiler and the C++ compiler handle this case differently.
The Delphi compiler now emits code like this in the .hpp file for an interface parameter with a nil default value:
void methodName(_di_IIntf param = _di_IIntf());
now fails to compile, emitting the error:
Cannot convert 'void *' to '_di_IIntf'
If you have Delphi code containing an interface parameter with a nil default value, recompile it with DCC32. If you do not have the source, edit the .hpp file and modify all occurrences like this
to this:
If you want to generate .hpp files (and the corresponding .obj) from a .pas file, you should use dcc32.exe with the -JPHNE switch. Or use -JL on the .dpk file containing the .pas file.
To more closely obey the rules of the C++ ANSI Standard, the C++ compiler shipping with C++Builder 2007 is stricter than previous versions. Code that did not generate errors in earlier versions of C++Builder might fail to compile with C++Builder 2007. This section lists some of the common areas where the compiler is stricter. Each case is illustrated with an example showing the problem and how to update the code to compile with C++Builder 2007. Note that there are often many ways to bring offending code up to date. The appropriate method depends on the intent of the original code.
There are many constructs that generate similar error messages with the C++ compiler included with C++Builder 2007. They fall in the following categories:
Previous versions of the Borland C++ compilers allowed various forms of binding to non-const reference parameters. In the following example, for instance, one was allowed to simply cast the psize parameter:
int takesLongRef(long& l); int takesUnsignedPtr(unsigned long* psize) { return takesLongRef((long)*psize); }
With C++Builder2007, the above code generates these errors:
Error E2357 test.cpp 3: Reference initialized with 'long', needs lvalue of type 'long' in function takesUnsignedPtr(unsigned long *) Error E2342 test.cpp 3: Type mismatch in parameter 'l' (wanted 'long &', got 'long') in function takesUnsignedPtr(unsigned long *)
To remedy this, you can cast psize before dereferencing, as in:
int takesLongRef(long& l); int takesUnsignedPtr(unsigned long* psize) { return takesLongRef(*reinterpret_cast<long*>(psize)); }
Be aware of cases that involve temporaries in unobvious ways. For example, some binary operators imply a temporary:
enum { zero, one, two } num; num |= two; // Not allowed num = num | two; // OK
Another case that involves temporaries in an unobvious way is the return value of a property. The following example illustrates code that compiled with previous versions of the compiler:
#include <vcl.h> class TTest { WideString FData ; public: __property WideString Data = {read = FData }; }; void Func(WideString& wref); void test() { TTest t; Func(t.Data); }
With C++Builder 2007, the above generates two errors:
Error E2357 test.cpp 14: Reference initialized with 'const WideString', needs lvalue of type 'WideString' in function test() Error E2342 test.cpp 14: Type mismatch in parameter 'wref' (wanted 'WideString &', got 'WideString') in function test()
You can fix this by changing the reference to a const reference, as in:
void Func(const WideString& wref);
The -Vbn and -Vbr switches can be used to force the compiler to allow these constructs. However, CodeGear recommends that you update your code to conform to the standard to avoid generating code contrary to your intent.
1.1 Reconcile Error Dialog
The temporaries and references issue referred to above is encountered in code generated by previous versions of the Reconcile Error Dialog Wizard. To remedy this, look for the VarToAnsiStr method
AnsiString VarToAnsiStr (Variant &V, TFieldType DataType)
and change it to take a const Variant&, as in:
AnsiString VarToAnsiStr (const Variant &V, TFieldType DataType)
String literals are now considered to be of type 'const char[]' by default. This, combined with the stricter qualification binding of const values and types, can generate error messages in code that compiled before.
You may enable the -Vbs switch to revert string literals to non-const. However, CodeGear recommends that you update the code instead.
Note that the change in the type of string literals can also change how the compiler resolves calls to overloaded methods. The following example illustrates this:
void foo(char *); void foo(const char *); foo("string"); // New Compiler picks foo(const char *)
The C++ compiler no longer allows an explicit template without the 'template <>' prefix. Use the compiler switch -Vbe to allow this. The following example shows this:
template<class> class foo { foo(); }; foo<int>::foo(); // Error template<> foo<int>::foo(); // OK
Also, the C++ compiler no longer allows explicit template specialization within a class. Use the compiler switch -Vbx to allow this. For example, this generates an error:
struct S {}; struct SP { template <typename T> void foo(const T &) {} template <> void foo(const S &) {} // Error };
One of the areas where the C++Builder 2007 compiler differs the most from the previous version is in overload resolution, which includes the detection of ambiguity. Several constructs that were previously allowed might now be reported as ambiguous or no match found, requiring that you modify code to clarify its intent.
The compiler option to revert to the old behavior, not enforcing the new stricter behavior, is -Vbo.
The following example illustrates the new behavior.
class X{}; void foo(X); void foo(const X&); void ambig() { X x; foo(x); //error }
The standard abs function might also generate an ambiguity message when invoked with a parameter that does not exactly match the types expected by the various overloaded versions of abs. Here is an example:
#include <limits> bool test(long l) { return std::abs(l) > 0; }
The code above generates an error and a warning:
Error E2015 test.cpp 5: Ambiguity between 'std::abs(int) at C:\dev\tp\sc\include\math.h:208' and 'std::abs(long double) at C:\dev\tp\sc\include\math.h:275' in function test(long) Warning W8057 test.cpp 6: Parameter 'l' is never used in function test(long)
To fix this, cast to the type of the overload you wish to invoke. For example,
#include <limits> bool test(long l) { return std::abs(static_cast<int>(l)) > 0; }
The compiler now obeys the rules of 8.5.1 and 13.3.1 of the 2003 C++ ANSI Standard for initialization and conversion:
Casts
For an explicit cast, the compiler now performs direct initialization on a temporary. Here is an example:
// in this example, dst is destination type and src is source type class A { }; class V { public: V() { }; V( const V & ) { } V( const A & ) { } }; class G { public: G() { } operator V() { } operator A() { } }; G g; V v; // direct initialization // ==> constructors are considered. V v9(g); // both of these statements compiled under 5.82 but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)' // casts // (V)g is treated as V tmp(g) which is direct initialization of 'tmp' // ==> constructors are considered. (V)g; static_cast<V>(g); // both of these statements compiled under 5.82 but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)' // copy initialization with dst=V src=G // ==> user-defined conversion sequences are considered. V v4 = g; V v5 = G(); // both of these statements now compile but under 5.82 got the error: // Error E2015: Ambiguity between 'V::V(const A &)' and 'V::V(const V &)' // copy initialization with dst=V src=V // ==> converting constructors of V are considered. V v6 = (V)g; V v7 = V(g); // both of these statements compiled under 5.82 but now get the error: // Error E2015: Ambiguity between 'V::V(const V &)' and 'V::V(const A &)'
5.1 Conversion via user-defined operators
The new C++Builder 2007 compiler often reports ambiguities for conversions that involve user-defined operators. An example is shown below:
class AnsiString { public: bool operator ==(const AnsiString& other); AnsiString(const wchar_t* src); }; class Variant { public: operator AnsiString() const; operator wchar_t*() const; bool operator ==(const AnsiString& rhs) const { return static_cast<AnsiString>(*this) == rhs;} };
C++Builder users might notice that the above is a stripped down version of the VCL AnsiString and Variant classes. Previous versions of the compiler invoked the 'Variant' 'operator AnsiString() const' for 'static_cast<AnsiString>(*this)', while C++Builder 2007 uses 'conversion via constructor'. Since the Variant can be converted to multiple types for which there are AnsiString constructors, the compiler generates an ambiguity error.
To correct this error, you must eliminate the cast as in:
bool operator ==(const AnsiString& rhs) const { return (*this) == rhs;}
You can also be explicit about the operator:
bool operator ==(const AnsiString& rhs) const { return this->operator AnsiString() == rhs; }
5.2 Variant/OleVariant/AnsiString/WideString/TDateTime
The issue described above with a user-defined conversion operator vs. conversion via constructor might be encountered in several constructs involving the VCL classes Variant, OleVariant, AnsiString, WideString, TDateTime, Currency, and so forth. The following table lists constructs that now generate error messages and the updated syntax.
The underlying compiler change for the errors described above is related to the way the compiler now handles initialization and conversion.
If you have been using dbExpress with Delphi 2007 for Win32, and you upgrade your copy of Delphi 2007 for Win32, you do not need to make any source code changes. However, you do need to recompile any code that uses the SQLExpr or DbxCommon units, two units that have changed since the first shipment of Delphi 2007 for Win32.
The new MySQL dbExpress driver, dbxmys30.dll, was tested against LibMySQL.dll from a 5.0.xx server install. If you intend to use dbExpress against MySQL 4.0.xx, you should either upgrade your LibMySQL.dll to a 5.0.xx version or use the dbxmysA30.dll driver with dbExpress. Using an older version of LibMySQL.dll with the current dbExpress driver for MySQL can result in unexpected behavior.
An error message is displayed when trying to expand a table node from Data Explorer using LibMySQL.dll (4.x version):
The following combinations have been tested:
If you wish to use the DBXMysA30 driver, you can both rename the DBXMys30.dll to DBXMys30.dll.bkup and DBXMysA30 to DBXMys30.dll. Alternatively, you can add a new entry to the dbxdrivers.ini file that defines DBXMysA30.dll as the LibraryName.
Delphi database driver Framework. This is an object oriented driver Framework written in Delphi.
Delegate driver support. A delegate driver is a driver between the application and the actual driver. Delegate drivers allow for pre and post processing of all public methods and properties of the dbExpress 4 Framework. Delegate drivers are useful for connection pooling, driver profiling, tracing, and auditing. Delegate drivers are easy to implement. See the source documentation at the beginning of the DBXCommon unit for more information.
TDBXPool delegate driver. Provides connection pooling for any dbExpress driver.
TDBXTrace delegate driver. Provides enhanced tracing capability. Produces Delphi code for all traced methods and properties.
Extensible Commands. Commands that are not SQL statements or stored procedures are supported by specifying a custom "command type" property. This property is a String allowing driver and delegate driver implementers to introduce their own command type namespace of custom commands. The TDBXPool delegate driver leverages this capability to implement a "show pools" command, which returns a reader with information on the current state of all connection pools.
Source code documentation. Works with help insight for all public methods, properties, and events. XML/HTML documentation can also be generated using the --doc Delphi compiler switch.
Single source. dbExpress 4 source code can be compiled for both Win32 and .NET platforms.
dbExpress 4 source code. Full source code is provided for the dbExpress 4 Framework.
Dual interfaced drivers. All CodeGear dbExpress drivers implement the older dbExpress 3 and newer dbExpress 4 interfaces.
dbExpress 3 adapter driver. The dbxadapter30.dll DLL provides a dbExpress 4 interface for existing dbExpress 3 drivers. This allows applications to still use older non-CodeGear dbExpress 3 drivers with dbExpress 4.
The unified code base is much easier to read, debug, and maintain.
VCL now accesses dbExpress database drivers using the new dbExpress 4 Framework.
Both Unicode and ANSI drivers ship with dbExpress. The Unicode version is dbxoraW30.dll and the ANSI version is dbxora30.dll.
dbExpress 2.5 is no longer supported in this release.
The new MySQL driver is called dbxmys30.dll. This driver supports Unicode strings. This driver works only with the version of MySQL's libmysql.dll for MySQL 4.1 and 5.0 servers. dbxmys30.dll does not work with older versions of libmysql.dll.
The old MySQL driver is still included in the product but has been renamed to dbxmysA30.dll. The "A" has been added to the DLL name to signify that this older driver only supports ASCII strings, not Unicode. dbxmysA30.dll can only be used with versions of MySQL's libmysql.dll that support MySQL servers version 4.0 and below.
Project|Options|Packages must have the Build with runtime packages option checked. DbxCommonDriver100.bpl must be deployed with your application. As with prior releases, if your application uses any of the DBX*.dll dynalink dbExpress drivers, they also must be deployed.
For the most part, the product maintains unit interface compatibility with BDS2006. However, the dbExpress VCL breaks this compatibility in three units: SQLExpr, DBXpress, and SQLConst. Only SQLExpr contains components. DBXpress has been deprecated. To avoid conflicts with the BDS2006 version of dbExpress100.bpl, dbExpress100.bpl has temporarily been renamed dbExpress4100.bpl. The "4" signifies that this version of the dbExpress package is for version 4 of the dbExpress drivers. When version 11.0 of the VCL ships, the normal VCL naming convention will be resumed and dbExpress4100.bpl will be renamed dbExpress110.bpl.
*Driver not fully certified with this version of the database.
To avoid this error, create or update the following registry entry:
HKEY_CURRENT_USER\Console\LoadConIme
This entry is type REG_DWORD and you should set its value to 0.
The default Delphi SOAP Server application with Web App Debugger class does not compile. There are two possible workarounds:
Copyright 2007 CodeGear Software. All rights reserved.
Published on: 6/5/2007 1:28:39 PM
Server Response from: BDN9A
Release Notes for Delphi® 2007 for Win32® and C++Builder®
Contents
Installing, Uninstalling, and Upgrading Your Product
General Notes
Known Problems
Cannot Use Dynamic Link RTL if Dynamically Load DLL
Must Turn off NO_STRICT #define with GdiPlus library
ActiveX
C++Builder and C++ Compiler Notes
Binary Incompatibility with Previous Version of C++ Compiler
Delphi Interface Parameter with Default Value of nil Handled Differently Assigning the Type void * to Delphi Interface Now Fails to Compile
Selecting Both of the Symbol Reference Info Options for Delphi Code
Specifying WebSnap Directories
Location Change for Precompiled Headers
Generating C++ Files from the Delphi Compiler
C++ Compiler Changes
Windows VistaTM Notes
Command Line Notes
Database Notes
Upgrading dbExpress for Delphi 2007 for Win32
New features
dbExpress 4 Framework
Single source dbExpress VCL components
New database Drivers
New Unicode enabled database drivers
Oracle dbExpress Unicode and ANSI drivers
Database Change Notes
dbExpress 2.5 not supported
New MySQL dbExpress driver
Delegate drivers
dbExpress VCL components
dbExpress application deployment for the Win32 platform
Using packages
Unit interface compatibility
Supported Servers
dbExpress
Debugger Notes
Documentation Notes
International Notes
Together Notes
VCL/RTL Notes
SOAP Server
Borland® Copyright© 1994 - 2008 Borland Software Corporation. All rights reserved. Contact Us | Site Map | Legal Notices | Privacy Policy | Report Software Piracy