C ++ builder 6 and codegear C ++ builder 2009 compatibility

I need to support some program codes that were developed using C ++ builder 6, and the current development environment is Codegear C ++ builder 2009. I wonder if the codelear C ++ builder 2009 code is compatible with C ++ Builder 6?

Any answer is welcome.

Thanks in advance.

David.

+4
source share
1 answer

It depends on what kind of "backward compatibility" you really need. AnsiString certainly still exists in CB2009, but its behavior (finally) has changed a bit to properly support Ansi code pages. The VCL components in CB2009 are now based on UnicodeString, rather than AnsiString. In addition, there are some migration issues that you must be careful about, such as component event handlers that used AnsiString parameters in BCB6, especially those that are passed by reference. And then there is the Win32 API. CB2009 has the option "_TCHAR maps to" to switch between Ansi and Unicode in the API (which will NOT switch the VCL between Ansi and Unicode, BTW).

Most of the code that you use in BCB6 will โ€œcompileโ€ in CB2009, but it may or may not โ€œfunctionโ€ the way you expect, depending on what you do with it. You really need to do a code review regarding the use of the AnsiString / WideString and char / wchar_t values, and also see what works as it is and what needs to be rewritten.

+5
source

All Articles