Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My own packages and "File not found: foo.dfm" error during a compile...

730 views
Skip to first unread message

John Lemons

unread,
Nov 23, 1999, 3:00:00 AM11/23/99
to
This is kind of an odd question. I'll try to be clear.

I have a package that contains a lot of custom components. The source code
is stored in PackageDir/source and the dcu and bpl files are created and
stored in PackageDir/dcu. The DCU dir is in my library path, but the source
directory is not. When I try to compile a project that uses these
components, I get the following error for every component in the package
that has an associated form:
[Error] File not found: 'foo.DFM'
What in the world am I doing wrong? If I add the source directory to my
library path, of course the error goes away. But that doesn't really
leverage the power of a package. Any help would be greatly appreciated.

John
jle...@alpha1.net

Nick Hodges (TeamB)

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
On Tue, 23 Nov 1999 13:47:19 -0600, "John Lemons"
<jlemon...@alpha1.net> wrote:

>If I add the source directory to my
>library path, of course the error goes away.

Right, because the compiler can thus find the code.

>But that doesn't really
>leverage the power of a package.

I am not sure what you mean by this.


Nick Hodges
TeamB

John W. Lemons III

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
Either I wasn't clear or I'm seriously confused. I have a package
project that compiles and installs fine. When I try to use components
in the package in another project, I can drop them on a form, and they
look great, but won't compile unless the source code that was used to
make the package is on the library path. My experience has been,
through use of other packages, that the source isn't needed to use the
components. What am I missing here?

Wayne Niddery (TeamB)

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
John W. Lemons III wrote in message
<383bf443...@forums.inprise.com>...

>Either I wasn't clear or I'm seriously confused. I have a package
>project that compiles and installs fine. When I try to use components
>in the package in another project, I can drop them on a form, and they
>look great, but won't compile unless the source code that was used to
>make the package is on the library path. My experience has been,
>through use of other packages, that the source isn't needed to use the
>components. What am I missing here?

Either the source or the compiled dcu files need to be on the library path.
If a compatible dcu can be found, then it is just linked, otherwise it needs
the source to compile first.

--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
Toronto Delphi Users Group - http://www.tdug.com/


John W. Lemons III

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
Thats my understanding as well. The DCUs are on the lib path (same
directory as the BPL and DCP), but it fails when trying to find the
DFMs. The DFM and PAS files are in a source directory, that when not
in the lib path, causes the build to fail. Why its looking for the
DFM files I'm not sure. I'm beginning to think I have a serious
conceptual flaw about how packages work.

Ray Lischner

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
On Tue, 23 Nov 1999 13:47:19 -0600, "John Lemons"
<jlemon...@alpha1.net> wrote:

>When I try to compile a project that uses these
>components, I get the following error for every component in the package
>that has an associated form:
>[Error] File not found: 'foo.DFM'

If you were to use a runtime package, you would need the package's DCP
file in your search path.

Because you are not using a runtime package for your components, you
need the units' DCU and associated DFM files in your search path. The
rules are the same as they've always been.
--
Ray Lischner, author of Delphi in a Nutshell (coming later this year)
http://www.bardware.com and http://www.tempest-sw.com

0 new messages