Delphi 2010 - 包问题,文件未找到错误

发布于 2024-08-10 09:41:19 字数 466 浏览 1 评论 0原文

我在使用带有插件的应用程序时遇到问题。最初,所有内容都编译成单个 exe,但现在,我想将一些代码单独取出到 bpl 中。 exe 和新 bpl 共享的代码被放入第三个 bpl 中。

application.exe 使用包 api.bpl 编译 api.bpl 仅包含一个文件 api.pas plugin.bpl 需要 api.bpl。

我在磁盘上有以下结构:

.\ - exe 和 bpls 的最终输出
.\src - application.exe 和 api.bpl 的源文件,包括共享 api.pas
.\dcu - 所有项目的 dcu 输出
.\plugin - 插件源

我可以毫无问题地编译 application.exe。
我可以毫无问题地编译 api.bpl。
但是当我尝试编译plugin.bpl时,它首先尝试构建api.bpl,然后它抱怨找不到api.pas。

这是为什么?

I have a problem with a application with plugins. Originally, everything was compiled into a single exe, but now, I want to take out some of the code into a bpl on its own. The code that is shared by both the exe and the new bpl is put into a third bpl.

application.exe is compiled with package api.bpl
api.bpl contains only one file, api.pas
plugin.bpl requires api.bpl.

I have the following structure on disk:

.\ - final output for exe and bpls
.\src - sourcefiles for application.exe and api.bpl, including shared api.pas
.\dcu - dcu output for all projects
.\plugin - plugin source

I can compile application.exe without a problem.
I can compile api.bpl without a problem.
But when I try to compile plugin.bpl, it tries to build api.bpl first, an then it complains that it can't find api.pas.

Why is that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清旖 2024-08-17 09:41:19

这是 Delphi 构建系统中的一个怪癖。它试图在与plugin.bpl相同的构建规则下构建依赖包,而不是在它自己的规则下。查看项目选项中的plugin.bpl 并确保它与api.bpl 具有相同的路径,然后它应该可以工作。

This is a quirk in Delphi's build system. It's trying to build the dependent package under the same build rules as plugin.bpl, not under its own rules. Look in Project Options for plugin.bpl and make sure it has the same paths as api.bpl, and then it should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文