Note: DCU path is .\$(Platform)\$(Config)\$(SanitizedProjectName)
Note: DCU path is .\$(Platform)\$(Config)\$(SanitizedProjectName)
Originally shared by Jeroen Wiert Pluimers
Anyone having seen this one with a regular project during "compile", but not during "build"?
[dcc32 Fatal Error] myUnitA.pas(149): F2063 Could not compile used unit 'myUnitB'
In this case:
- XE8
- All sources are referenced from the project (no need to be on the path) and can be found
- This happens with and without project group
- If the project group is loaded, various projects have a few units that have the same unit name, but different locations
- There are a few large circular unit cycles in the implementation sections
- No packages involved
Originally shared by Jeroen Wiert Pluimers
Anyone having seen this one with a regular project during "compile", but not during "build"?
[dcc32 Fatal Error] myUnitA.pas(149): F2063 Could not compile used unit 'myUnitB'
In this case:
- XE8
- All sources are referenced from the project (no need to be on the path) and can be found
- This happens with and without project group
- If the project group is loaded, various projects have a few units that have the same unit name, but different locations
- There are a few large circular unit cycles in the implementation sections
- No packages involved
My bet is on the circular refs.
ReplyDeleteSometimes repeating the compile also works. Not sure when yet. Still figuring out. Large code base, etc.
ReplyDeleteCannot exactly pinpoint issues with compile, but long time ago I switched exclusively to build.
ReplyDeleteDoes it help when you specify different DCU paths for each project?
ReplyDeleteUwe Raabe they already are. Same paths would get even more headaches. I'll put that in the post.
ReplyDeleteSometimes, too, caching is your enemy. If you kill Delphi, reload and rebuild, do you still get the error? As Dalija Prasnikar said, though, I gave up "compile" years ago. Too many failures.
ReplyDeleteI tried using $(SanitizedProjectName) a while back. I gave up because I could not make it work properly. If I have time, I'll document the problems
ReplyDelete