将组件添加到组件文件夹
我正在开发一个 Delphi 项目,我想向它添加一个解析器。解析器附带了应该添加到项目中的组件,
因此,如果我将文件添加到项目所在的同一文件夹中,效果会很好,但我希望它位于单独的组件文件夹中(以保持干净,因为无论如何我不会修改这些文件)。
但是,当我添加创建组件文件夹并在其中添加文件时,当我通过delphi将其添加到项目时,很难找到文件。因此,它将 .psu 文件添加到正确的文件夹中,但它说找不到单元“Calculator”,例如,直到我将 Calculator.dcu 文件从组件目录复制到源目录。
我如何告诉 Delphi 在我放置的位置查找这些文件?
谢谢
I'm working on a Delphi project and I want to add a parser to it. The parser comes with components that should be added to the project
So it works great if I add the files to the same folder that my project is in, but I would like it to be in a separate components folder (to keep it cleaner, since I'm not going to be modifying those files anyway).
However, when I add create a components folder and add the files there, when I add it to the project through delphi, it has trouble finding the files. So it adds the .psu files to the right folder, but it says it can't find the unit 'Calculator', for example, until I copy the Calculator.dcu file from the component directory to the source directory.
How do I tell Delphi to look for those files where I put them?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您有一些选择:
delphi
标签上问题的常见来源...;-)You have some options:
delphi
tag... ;-)在项目选项中查看项目的搜索路径。确保您的 .pas 和/或 .dcu 文件位于该搜索路径中,即将单元所在的文件夹添加到项目的搜索路径中。
Take a look at the Search Path for the project in the project options. Make sure your .pas and/or .dcu files are in that search path, i.e. add the folder in which the units are to your project's search path.