When I compile my projects in FB with Delphi XE2 I get these error message for some of my projects
c:\program files (x86)\embarcadero\rad studio\9.0\SOURCE\RTL\SYS\System.Variants.pas(960) Fatal: E2158 System.Variants unit out of date or corrupted: missing '@VarCast'
or
c:\program files (x86)\embarcadero\rad studio\9.0\source\data\bde\BDE.pas(4897) Fatal: E2226 Compilation terminated; too many errors
or
KGsMenuService_Impl.pas(16) Fatal: F1026 File not found: 'ExtCtrls.dcu'
The global library paths that we use are pulled from the registry, which suggests that you have added the delph rtl/vcli source folders to your library path. If you are doing that then they must all be before any lib folders (and it’s not recommended unless you know what you are doing).
Why? Why are you compiling the Delphi RTL/VCL library source code?
In any event, on the Directories Page, make sure you have the correct FrameWork Type selected, Delphi XE uses Namespace prefixes to differentiate between the different frameworks it uses.