If you've encountered unresolved external linking errors while compiling old BCB (eg, BCB6) projects in BCB2006, such as
[Linker Error] Error: Unresolved external '__tpdsc__ System::String' referenced from xxxx.OBJ[Linker Error] Error: Unresolved external '__fastcall Sysutils::AllocMem(unsigned int)' referenced from xxxx.OBJ[Linker Error] Error: Unresolved external '__fastcall Db::TFieldDef::TFieldDef(Db::TFieldDefs *, const System::AnsiString, Db::TFieldType, int, bool, int)' referenced from xxxx.OBJ[Linker Error] Error: Unresolved external '__fastcall Db::TDataSet::Resync(System::Set)' referenced from xxxx.OBJ[Linker Error] Error: Unresolved external 'System::__linkproc__ VarArrayGet(System::Variant&, int, int)' referenced from xxxx.OBJ[Linker Error] Error: Unresolved external 'System::__linkproc__ __fastcall VarClr(System::Variant&)' referenced from xxxxy.OBJ
you're encountering these errors because you're linking in object files compiled with older versions of BCB. The proper way to resolve these errors is to recompile the source files from which these object files are created. However, if you don't have the source files, there's a workaround.
The workaround is created by adding pragma aliases to any existing unit, such as
#pragma alias "@Sysutils@AllocMem$qqrui" = "@System@AllocMem$qqrui"#pragma alias "@System@@VarArrayGet$qr14System@Variantii" = "@Variants@@VarArrayGet$qr8TVarDataipxi"#pragma alias "@System@@VarClr$qqrr14System@Variant" = "@Variants@@VarClr$qqrr8TVarData"#pragma alias "@Db@TFieldDef@$bctr$qqrp13Db@TFieldDefsx17System@AnsiString13Db@TFieldTypeioi" = "@Db@TFieldDef@$bctr$qqrp13Db@TFieldDefsx17System@AnsiString13Db@TFieldTypeioi"#pragma alias "@Db@TDataSet@Resync$qqr36System@%Set$t9Db@DB__06$iuc$0$iuc$1%" = "@Db@TDataSet@Resync$qqr36System@%Set$t9Db@DB__26$iuc$0$iuc$1%"#pragma alias "@$xp$13System@String"="@$xp$13System@string"
In 2017, with the release of Delphi 10.2 Tokyo, Embarcadero introduced a specialized implementation of the Observer pattern into the System.Classes unit. While it has been in the wild for 9 years, it remains a "hidden" architecture for many, primarily because it serves as the invisible engine behind LiveBindings. Other than live bindings, you can also use the Observer pattern as a way to update component settings to the Windows registry, an .ini file, or persist it elsewhere.
System.Classes