Mer 12 Dic 2012     

Embarcadero ha introdotto in C++ Builder XE3 un compilatore a 64 per Windows (BCC64) che si va ad aggiungere al vecchio compilatore a 32 bit (BCC32) che è utilizzabile per Windows e Mac OS X, a differenza del nuovo compilatore da 64 bit che è disponibile solo per Windows e per processori Intel. In questo post sono illustrate alcune differenze tra i due compilatori.

Il nuovo compilatore supporta gli standard C++98, C++TR1, C++11, ANSI C, ISO C, C99, C11, ed usa la versione 5.3 del Dinkumware's Standard C and Standard C++ libraries, mentre il compilatore a 32 bit usa la versione 5.01. Inoltre il nuovo compilatore usa la versione 1.5 delle Boost C++ libraries. Il vecchio compilatore a 32 bit non supporta la versione 1.5 delle Boost C++ libraries, ma la versione 1.39, e non supporta parte dello standard C++11.

Some compiler and Windows differences to be aware of (most of the time the compiler and RTL will take care of things for you unless you have platform specific code):

  • 64-bit Windows Applications use the familiar Windows API
  • Windows API calls must be 64-bit versions.
  • Try blocks are supported in 64-bit Windows programs.
  • A 64-bit Windows application can use a 32-bit Windows type library (as some 64-bit MS Office applications do).
  • Cannot mix 32-bit and 64-bit code in the same process.
  • DLLs, components, libraries, and packages require that you compile or install separate 32-bit Windows (design-time) and 64-bit Windows (run-time) versions if you want to use the Form Designer.
    64-bit Windows is needed for OS extensions, shell extensions.
  • The size of LRESULT, WPARAM, and LPARAM all expand to 64 bits, so message handlers will have to be checked for inappropriate casts.