When using packages the compiler generates F20151 errors.
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:
Comments (4)
-
repo owner -
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.
-
reporter - changed status to closed
The problem was most likely caused by an unclean source tree.
-
repo owner - removed milestone
Removing milestone: Future version (automated comment)
- Log in to comment
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)