A
A
avp2016-09-21 15:49:13
C++ / C#
avp, 2016-09-21 15:49:13

What version of C++ Builder (maximum available) can I run a C++ Builder 6 project on?

Hello.
I have a project written with C++ Builder 6. Unicode support is required. What version of Builder can help in solving this issue, so that the project does not have to be rewritten for the new version.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2016-09-21
@Mercury13

Will have to rewrite.
1. Because in pascal - string is string, and earlier it was Ansi-, and now Unicode-. And in C - exactly what AnsiString / UnicodeString.
2. Same for char. In Pascal, you can declare that from now on char is two-byte, and in C there is a standard, and according to the C standard, char is one byte.
3. What algorithms are used? Some algorithmic tricks are possible in the manner of the Boyer-Moore substring search algorithm - you will also have to rewrite there.
4. If the program works with files or a network, you must specify how to serialize Unicode strings. On Windows, UTF-16 Intel and UTF-8 are common. On this score, AnsiString is almost never used in true unicode programs due to the fact that it stores the encoding; if you need a chain of bytes, there is RawByteString or std::string.
5. Sometimes old programs work with Unicode via WideString (wrapper over BSTR). Now this WideString will have to be massively changed to Unicode-.
6. Standard Delphi/VCL headers are written differently. Previously #include <Forms.hpp>, now - #include <Vcl.Forms.hpp>.
Version Builder - well, whatever you find. Just don't forget that C++11 has an enum class (not quite standard, really) and something else. I haven't tested how the new clang works under XE10, but it's just a matter of efficiency, corrosiveness, and C++11 - the migration to Unicode will have to be done as before.
As for "corrosiveness". I've always thought that G++ is the most "corrosive" compiler. But according to the clang static analyzer (built into Qt Creator, my current working tool), it seems that it has surpassed this record as well. And to make the same file compile under the ancient Borland and the ultra-modern clang is hard, in my opinion. Namely, this is what Embarcadero required from XE3 to XE8, if both x86 and x64 versions are needed. So let the BCC32 go where it wants to go!
Yes, I had to migrate to Unicode when Builder XE came along. How glad I was!
I know that it will pick up and convert XE2. As for the newer ones, I don't know. But even if it doesn’t convert, it doesn’t cost anything to build a new project from scratch and add all the modules and forms there. But converting is only half the story; then you have to achieve compilability, and then Unicode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question