The 25 days of C++mas - December 19 - Migrating C++Builder Code to 64-bits (2)

Posted by on in Blogs
In my first blog post about Bruneau Babet's CodeRage 7 C++ session, "Migrating C++Builder Code to 64-bits", I covered some of the language extensions added to support Win64 and integration with Delphi language features.  In part two I'll list a few more of the migration items that Bruneau presented.  With C++Builder XE3 64-bit, you can generally take your C++ 32-but VCL and FireMonkey applications, add the 64-bit Windows target platform and do a rebuild.  But, since the 64-bit compiler is based on a different compiler (and just like with Delphi 64-bit migration), there will always be  some Win64 adn 64-bit considerations that you need to take a look at.  Many of these items are also documented on the Embarcadero DocWiki at and,_the_C%2B%2B_64-bit_Windows_Compiler.

Linking libraries and objects

If you have separately compiled object and library files, you'll need to be aware of the differences in file extensions. In using the "#pragma link" and "#pragma comment", Bruneau gave the following advice:

  • #pragma link “<obj-name>” - Remove extension: WIN32 will default to .obj and WIN64 to .o

  • #pragma comment(lib, “<lib-name>”) - Remove extension: WIN32 will default to .lib and WIN64 to .a

Differences in IDE generated event handlers

Watch for differences between WIN32 and WIN64 in IDE-generated event handlers. E.g. TPoint and other records 5-8 bytes long fit in a register in WIN64 but are passed by reference in WIN32.

Cool in C++ 64-bit compiler

Not so cool in C++ 64-bit compiler

Future (maybe?)

Watch/Download the C++Builder 64-bit Compiler Preview Video

Additional details about the 64-bit C++Builder compiler are available in the preview video.  Watch the C++ 64-bit compiler preview video on YouTube at You can also download the MP4 video file at  The preview video is 9 minutes long.

Try the C++Builder 64-bit compiler

The C++Builder XE3 and RAD Studio XE3 free trial downloads have been updated to include the new C++Builder 64-bit compiler.  Trial downloads are available at

Happy C++mas!

During the first 25 days of December leading up to Christmas, I will blog about the release of the C++Builder 64-bit compiler for Microsoft Windows and C++Builder XE3 support for building VCL and FireMonkey 2 applications.
Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.
Comments are not available for public users. Please login first to view / add comments.