Upgrading Existing C++ Projects to 64-bit Windows

From RAD Studio
Jump to: navigation, search

Go Up to C++Builder 64-bit Windows Application Development

Existing BCC32-based projects must be updated to compile correctly with BCC64, or to use the same codebase with both platforms simultaneously. In addition to these project- and tool-related differences, note that BCC64 is also a stricter compiler.

Object and Library File Format

  • BCC32 and its associated tools use OMF in .obj and .lib files.
  • BCC64 uses ELF in .o and .a files.

Where possible, you should remove object and library file extensions, so that each tool can use the appropriate extension. When necessary, as in custom scripts, change the extension make it conditional with version detection.

#pragma link

If the files named in #pragma link statements contain a file extension, those extensions must be removed. Each compiler will append the appropriate extension.

For example, Control Panel apps that use this statement:

#pragma link "Ctlpanel.obj"

must be updated to read:

#pragma link "Ctlpanel"

For more information, see #pragma link.

#pragma comment

For libraries, it is best to use #pragma comment(lib ..), as in:

#pragma comment(lib, "library-name") // Looks for library-name.lib in WIN32 and library-name.a in WIN64

#include <windows.h>

Applications that use the Windows API must explicitly contain:

 #include <windows.h>

With BCC32, including windows.h is not required, but BCC64 requires windows.h and is more strict about #includes.

For more information, see #include.


The NO_STRICT type checking scheme is not supported in BCC64. If you have existing projects that use it, it should be removed.

For more information, see C++ Applications Use STRICT Type Checking.

Updating WebBroker Projects

  • Change #pragma link as described above.

See Also