--- In [email protected], "Rob Kennedy" <[EMAIL PROTECTED]> wrote:
> The DPR file contains references to all the units that are members 
of your
> project. Look in it and you'll see. The references might be relative
> paths, but they might also be absolute paths. If they're absolute, 
then
> it's obvious how the compiler is finding the units you don't want 
it to
> find -- you're telling it exactly where they are.
> 
> Units that aren't members of your project are found with the 
library path
> and the search path.
> 
> I recommend that any project should contain all and only those 
units that
> the compiler should compile when building that project. And no unit 
should
> be a member of more than one project. If you have units that are 
used by
> multiple projects, then put that unit in a package. When you want to
> recompile that shared unit, recompile the package. That way, you're 
less
> likely to accidentally break one project by changing the shared unit
> during an editing session of some other project. Instead, you'll 
have to
> open the package, thereby reminding yourself that you're working on 
shared
> code.
> 
> This doesn't mean you need to use run-time packages. In this case,
> packages are just a way of structuring your projects.
> 
> Keeping everything separate like this lets you do another 
organizational
> task, which is to keep source files and compiled files in separate
> directories. I compile _all_ my DCU files into a single folder (one 
per
> Delphi version). My search path consists of only that directory. 
This way,
> the compiler never accidentally finds the source to a unit I don't 
want it
> to find. This is because all the source I want it to find it 
mentioned
> explicitly in the project file -- the compiler is only compiling 
units
> that actually belong to the project I'm working on.
> 
> -- 
> Rob

Thanks for answering. I'd already checked out the dpr, and no paths 
are given for the pas files. The project files were already copied to 
the new folder anyway, so these are not the files that are 
unexpectedly getting found.
I'd already checked my search path and there's nothing in there 
(apart from $(DELPHI)\Lib\soap_update the new D7-D2006 SOAP update 
files).

But.. At one time I was experimenting with compiling the old 
application into run-time packages.
Although the "Build with run-time packages" checkbox is now off, 
there's a few remnant bpl's in the \Bpl folder and a couple of DPK's 
in the old project folder. That *might* have something to do with it.

But it's still a mystery. As I said in previous message, I can only 
work around it by renaming the old folder which is what I've done.

Ian.


Reply via email to