I am writing a designtime package in Delphi 2007.
I decided to move some event type declarations into their own Events
unit so they can be used in multiple units. When I did the compiler started complaining Undeclared identifier: 'Event Name'
in the units where these events were originally declared. The type declarations are all in the interface
section of the Events
unit and I have added the Events
unit to the other units' uses clause but its like the compiler is completely ignoring the Events
unit.
The IDE has no trouble finding the declarations when you CTRL + Click in the type name from another unit. Hovering the mouse over the type name displays the unit its declared in along with its parameters. Even the usually craptastic and paranoid Error Insight feature of the IDE doesn't see a problem. Only the compiler complains about it.
I tried reproducing this problem in another, simpler package project to try to isolate it but I can't reproduce it.
Has anyone else seen this behavior before and is there a work around?
Project->Build
. Check again for the .dcu on your drive, and see if there are any you don't expect to be there (or one in a different location than where you'd expect it to be). – Ken White