For forums, blogs and more please visit our
Developer Tools Community.
By: Robert West
Abstract: Notes on the exact changes made to ATL3.0 for Borland C++Builder 5
As part of the release of C++Builder 5.0, changes were made to the Active Template Library (ATL) version 3.0, mostly for the purpose of working around differences between the behavior of the Microsoft and Borland C++ Compilers. Several other changes were made in response to recommendations found in technical notes on Microsoft's web site. This document lists the changes that were made. Except where otherwise noted, all changes are wrapped with either #ifdef __BORLANDC__ or #ifndef __BORLANDC__.
A number of changes were made due to differences in the compiler's mechanism for handling precompiled headers. The Borland C++ compiler does not allow the inclusion of initialized static data in precompiled headers even in cases where the data was declared with use of __declspec(selectany), nor does it allow executable code in precompiled headers. In order to allow precompiling of ATL headers, those parts of the code which were not allowed in the headers were removed and placed in BCBATLLIB.CPP, which was built into BCBATL.LIB; instructions to the linker to pull in this library are included in several headers.
Specific changes made for precompiled header compatibility were:
Other changes were required by differences in the way that import libraries are handled. In Visual C++, seperate system DLLs each get their own import library; in C++Builder, the imports for all system DLLs are combined into a single import library which is linked into all projects. In addition, atl.lib does not exist in C++Builder. Thus, the following changes:
A handful of changes were made due to differences in the handling of header files.
The following changes were made to fix bugs in the ATL itself. In most cases they were recommended by Microsoft via their web site:
In addition, the explicit override in ATLBASE.H of CComQIPtr is disabled because it is not needed.
Also, ATLBASE.H, ATLCTL.H, ATLDB.H, ATLDBCLI.H, ATLDEF.H, ATLWIN.H, and STATREG.H have code added which allows the IDE to set the define: _BCB_ATL_DEBUG, and have that turn on _DEBUG when appropriate.
Could not retrieve comments. Please try again later.
Free 30-day trial! Develop for Windows, Mac, Android, iOS, devices and gadgets!
More social media choices:
C++Builder on Google+
@RADtools on Twitter
Server Response from: ETNASC03