在Delphi中,您是否使用包含路径或显式包含所有必需的文件? [英] In Delphi do you use include paths or explicity include all required files?

查看:266
本文介绍了在Delphi中,您是否使用包含路径或显式包含所有必需的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看我们的代码库,一些代码被明确地包含在一个项目中,并从搜索路径中被拉入。有没有人对最好的做法有什么意见,为什么?

Looking at our codebase some code is included in a project explicitly and is pulled in from the search path. Does anyone have an opinion as to which is best practise and why?

更新:

我以为我会澄清我的问题我们所有的路径都是亲戚,所以我们可以有多个分支机构,它们都是指分支机构内的代码。所以我不是问相对路径,而是单位是否应该是.dpr或者使用搜索路径,这就是为什么以前提到的问题不能满足我的需要。感谢大家

I thought I would clarify my question. All our paths are relatives, so we can have multiple branches that all refer to code within their branches. So I'm not asking about relative paths, but whether units should be in the .dpr or picked up using the search path, which is why the previously asked questions don't quite answer my needs. Thanks to everyone

推荐答案

我有一个非常基本的方法来确定这个...如果代码是专门针对项目在其他地方使用)我明确地包括它。所有共享代码都从库路径中拉出。

i have a very basic way of determining this ... if the code is specific to the project (not used elsewhere) i include it explicitly. all shared code gets pulled from the library path.

最好的问候,
don

best regards, don

这篇关于在Delphi中,您是否使用包含路径或显式包含所有必需的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆