F2051: Unit %s was compiled with a different version of %s

后端 未结 1 659
轻奢々
轻奢々 2021-01-01 23:55

We\'ve been fixing bugs in the VCL in Delphi XE6. So far the folder contains:

| VCL Source Fixes
|----- Vcl.ComCtrls.pas
|----- Winapi.CommCtrl.pas


        
相关标签:
1条回答
  • 2021-01-02 00:19

    You need the compiler options to match those used when the unit was compiled by Embarcadero. That's the reason why your implementation section only change fails when it seems like it ought to succeed.

    Start a default project and use CTRL + O + O to generate these options. I get

    {$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N-,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
    

    when I do this in XE6.

    Put that at the top of your copy of the unit and you should be good to go. You can probably get away with a cut-down subset of these, depending on your host project options. In my code I find that:

    {$R-,T-,H+,X+}
    

    suffices.

    0 讨论(0)
提交回复
热议问题