menu
  Blog  delphi    

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]




61 articles, 121 .ZIP sources, 964 Fig.
Delphi Trainings

the Pascal Institute

Felix J COLIBRI

Links :
Home RSS feed  
Current :
Fmx Style Explorer
firemonkey_object_inspector
firemonkey_architecture
livebindings_spelunking
livebindings
firemonkey_animations
ifdef_ver230_xe2
firemonkey_styles
delphi_xe2
events_record_playback
delphi_video_player
induc_a_virus
cooking_the_code
html_viewer
unit_test_framework
gnostice_coderage_reference
Rave Reports video
generics_constraints
turbo_pascal_story
rave_reports_training
Rave Reports video
updated_download
Emarcadero ER/Studio
Emarcadero ER Studio
custom_training
bayesian_spam_filter
generics_tutorial
No_Ekon_Spring_Generics
rave_pdf_intraweb
Categories :
firemonkey (6)
delphi (8)
utility (5)
graphics (3)
debug_and_test (1)
database (25)
oop_component (3)
training (4)
download (1)
internet (24)
language (8)
system (4)
oo_design (3)
Archive :
oct 2011 (4)
sep 2011 (4)
aug 2011 (1)
oct 2010 (1)
sep 2010 (1)
aug 2009 (1)
jun 2009 (1)
feb 2009 (1)
jan 2009 (1)
dec 2008 (2)
nov 2008 (4)
jun 2008 (1)
may 2008 (2)
apr 2008 (1)
mar 2008 (1)
feb 2008 (2)
jan 2008 (1)
2007 (24)
2006 (10)
2005 (25)
2004 (7)