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

Comments

  1. Sometimes repeating the compile also works. Not sure when yet. Still figuring out. Large code base, etc.

    ReplyDelete
  2. Cannot exactly pinpoint issues with compile, but long time ago I switched exclusively to build.

    ReplyDelete
  3. Does it help when you specify different DCU paths for each project?

    ReplyDelete
  4. Uwe Raabe they already are. Same paths would get even more headaches. I'll put that in the post.

    ReplyDelete
  5. Sometimes, 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.

    ReplyDelete
  6. I 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

Post a Comment