When using packages the compiler generates F20151 errors.

Issue #91 closed
Jens Mühlenhoff created an issue

I have a project group with two packages and one VCL application.

When I use spring4d in the packages, I get this compiler error in the application that depends on the packages:

F2051: Unit Accurata.Encoding.Registry was compiled with a different version of Spring.Collections.Events.TCollectionChangedEventImpl`1.ForEach

If I add the source path of the offending unit to the search path of the application the compilation succeeds.

I'm using the current "develop" branch (SHA eaea5c49c9863051e645e6eb0ea0e476401394bc).

I have checked that the compiler switches are exactly the same as was suggested in this so question:

http://stackoverflow.com/q/25555009/426242

Comments (4)

  1. Stefan Glienke repo owner

    I suggest using the Spring.Base package as runtime package if you are already using other runtime packages. If you don't do that then make sure that your compiler does not have access to the DCUs that you might have created when installing Spring the first time (look for Spring.Collections.Events.pas)

  2. Jens Mühlenhoff reporter

    I have cleaned the Spring source tree and rebuild the Spring packages manually using the project group in the Packages folder. The problem is gone now.

  3. Log in to comment