At 3:08 +0200 11/9/05, Frank Heckenbach wrote:
Peter N Lewis wrote:
Ok, the problem is that there is no interface name determined for the "MainSrc" unit. This patch:
Should resolve it. It just uses the interface name as the lowercase of the basename of the MainSrc. The InterfaceName is not needed for compiling the main program, which is why this has gone unnoticed. I'm not sure if this InterfaceName determination is correct for modules.
I don't think so. Did you test it with a module that has a different interface name than its file name?
No, I would assume it wont work in that case. I'm afraid I have no idea even what the structure of a module is.
The patch should still be an improvement, it would at least work in the normal case, and should have no negative affect on any case (except perhaps a pathological case where you had two modules, each with an interface using the name of the other file).
A complete solution would presumably require parsing the file and determining its interface name. Perhaps GetDep needs to note that InterfaceName is '' and figure it out in the normal way? Or perhaps the way of kick starting the loop in CollectDeps needs to be adjusted so that MainSrc is simply a dependency of something non-existant, or CollectDeps could figure out the InterfaceName itself. It looks like the InterfaceName is not actually stored in the gdp, so that would seem to imply determining it requires reparsing the file, which obviously is not desirable, so perhaps the gpd needs to store the InterfaceName for this to work fully.
Can modules have multiple interface names? Peter.