[英]How to add library paths in Delphi 10
I am trying to install GLscene but getting problems with the source file locations. 我正在尝试安装GLscene,但是源文件位置出现问题。
It says in the install instructions to add the GLscene source directories into the global library path in tool/options/Delphi options/Library, which I have done but it has no effect. 它在安装说明中说,将GLscene源目录添加到工具/选项/ Delphi选项/库中的全局库路径中,我已经完成了此操作,但没有效果。
I can add the source directories into each package project directory and it then compiles, but I would rather have it accessible globally. 我可以将源目录添加到每个包项目目录中,然后进行编译,但是我希望可以全局访问它。
The GLscene library items I have entered are, 我输入的GLscene库项目是
C:\\Users\\Andy\\Documents\\Embarcadero\\Studio\\Projects\\GLScene_VCL\\Source C:\\用户\\安迪\\文档\\ Embarcadero公司\\工作室\\项目\\ GLScene_VCL \\来源
C:\\Users\\Andy\\Documents\\Embarcadero\\Studio\\Projects\\GLScene_VCL\\Source\\Shaders C:\\用户\\安迪\\文档\\ Embarcadero公司\\工作室\\项目\\ GLScene_VCL \\来源\\着色器
C:\\Users\\Andy\\Documents\\Embarcadero\\Studio\\Projects\\GLScene_VCL\\Source\\DesignTime C:\\用户\\安迪\\文档\\ Embarcadero公司\\工作室\\项目\\ GLScene_VCL \\来源\\设计时
Which are all correct, 都是正确的
anybody know any reason why the compiler can't find the files in these directories? 有人知道为什么编译器无法在这些目录中找到文件吗?
The compiler will search for source files on the library path. 编译器将在库路径中搜索源文件。 Note that there are separate library paths for different targets, eg Win32, Win64 etc. 请注意,对于不同的目标,例如Win32,Win64等,有单独的库路径。
If you have source files that cannot be found, then they are not in the library path that you specified. 如果您有找不到的源文件,则它们不在您指定的库路径中。
Personally I don't like the approach of using search paths for source files. 我个人不喜欢对源文件使用搜索路径的方法。 I like everything under my project directory so that I can check out from my VCS and have everything I need to build right there. 我喜欢项目目录下的所有内容,以便可以从VCS中签出并拥有在此处构建所需的一切。 A search path based approach makes serious development very difficult because you cannot maintain branches. 基于搜索路径的方法使认真的开发非常困难,因为您无法维护分支。 What if you have old versions to maintain that use old versions of your libraries? 如果您有使用库的旧版本维护的旧版本怎么办?
Well this is a bit late but it could help someone else. 好吧,这有点晚了,但可以帮助其他人。
Try and add the paths to both the Library Path and the Debug DCU Path . 尝试的路径同时添加到库路径和调试DCU路径 。
Recent Delphi versions have different build configurations for Release and Debug and my guess is that the Debug configuration only searches in the Debug DCU Path. 最新的Delphi版本对Release和Debug具有不同的生成配置,我的猜测是Debug配置仅在Debug DCU Path中搜索。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.