Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Analysis Issues

Status
Not open for further replies.

Glenn9999

Programmer
Jun 19, 2004
2,312
US
An issue I've been having: One of my projects has been reaching into another directory unrelated to it to compile a few units that I copied over to this project to use. Now I don't see any references to this other directory anywhere, so how do I find out why Delphi is compiling something it shouldn't?

For that matter, is there any good way to get a top-down view of a project to see all the units and procedures/functions/objects/classes of those units and other resources and how they are getting used?

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
GExperts has a project dependency checker that might be of use.
 
I've had the same issue with one of my applications. While debugging, it opened the main form of a completely unrelated program. After a while, I realized that the main form of both applications were named the same, and somehow, Delphi linked to the incorrect one (beats me as to why, since the correct one was in the same directory and the wrong one was in a completely different directory).

Now I'm a bit more selective on the name of my forms (especially my main form) to ensure there are no collisions with any other of my projects.
 
It has to do with the order of when Delphi finds these units. If for example you have a directory in your library path with one of the units with duplicate name as a unit in your project, I believe the library overrides whatever's in your project.

JD Solutions
 
Okay, thanks for the advice. For what I'm working on, I definitely am on new ground given the size and scope of it.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top