Do not forget XE2 $IFDEF VER230
Don't forget $IFDEF VER230 : when migrating to XE2 the sources of
DiSqlLite3,
many "E2251 : Ambiguous
Overload" compiler errors were detected. The
previous XE compiler however
worked like a charm.
The DiSqlLite3 contained units with "compatibility" code with functions
like
code UTF8ToUnicodeString to accomodate pre-Delphi-6 compilers. Those
parts
were excluded from compilation by $IFNDEF for Delphi 6, Delphi 7, up
to
Delphi XE. But of course, not yet for Delphi XE2 !
Therefore the XE2 compiler rightly complied those parts, which then
rightly
clashed with the XE2 RTL equivalents, displaying the dreaded
"Ambiguous
Overload" error.
Simply adding the appropriate XE2 VER230 defines to remove those parts
ALSO
from the XE2 compiler fixed the problem.
Certainly the DEFINEs could be organized to fall back automatically on
the
LAST version for which the code was written, VER220 (and not on one of
the
first Delphi version, VER80). This would allow this library to
automatically
compile for XE2, XE3, XE4 etc.
Anyway, no doubt Delphi Inspiration will update their product shortly,
and
add it to the fast growing "XE2 compatible 3rd party component" list. [delphi - 16/9/2011]
|