-3

After installing Delphi RAD Studio XE on a new computer (Win 10 Pro), I can't compile existing project:

[DCC Fatal Error] Variants.pas(1064): E2158 Variants unit out of date or corrupted: missing '@VarFromInt'.

The Variants.pas unit is exactly the same as before.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Dorota L.
  • 17
  • 1
  • 1
    That looks like you are including Variants.pas in your project, perhaps a copied version. I'm surprised that you say "Variants.pas is exactly the same as before" which suggests that you perhaps have a modified version. I think there is more to this than meets the eye. – David Heffernan Jul 17 '17 at 08:51
  • No, I only compare both units : this originally installed on new computer with that on the old one. – Dorota L. Jul 17 '17 at 09:50
  • Then your old project probably has some hard-coded dependencies to an old version of Variants.pas (or to some runtime directory). Just close the IDE, delete the .dproj file and open the .dpr file. A new dproj will be created with the proper library settings for XE. Such things can happen when you open an old project. Be sure to copy the directory with the project to a new location first. Do not mix them. – Rudy Velthuis Jul 17 '17 at 10:01
  • I have tried, but it didn't help. Thanks anyway. – Dorota L. Jul 17 '17 at 10:12
  • The problem is in procedure VarCopyByRef in Variants.pas – Dorota L. Jul 17 '17 at 10:15
  • 2
    You have to ask yourself why you are compiling an RTL unit. Why are you doing that? Normal usage is that you use the pre-compiled dcu files that are shipped with the product. Can you explain this? – David Heffernan Jul 17 '17 at 11:19
  • I see that our anonymous upvoters are out in force ...... – David Heffernan Jul 17 '17 at 12:20

1 Answers1

-3

Problem solved, invalid paths in Tools\Options\Library paths: C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\source\rtl\sys

Dorota L.
  • 17
  • 1
  • 2
    Rather than write an answer, based on information that we don't have, the best bet is to remove this question and answer which won't be useful to any other visitor. Or, if you want to keep it, edit the question so that the answer can be determined from information in the question – David Heffernan Jul 17 '17 at 12:19