简体   繁体   English

如何在Delphi 10中添加库路径

[英]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.

相关问题 使用新的 Delphi 10.4 社区工具>选项>语言>Delphi 选项>库输入库路径添加按钮不起作用 - Using new Delphi 10.4 community Tools>Options>Language>Delphi Options>Library enter library paths Add button does not work 使用Jenkins的多个Delphi版本:库路径 - Multiple Delphi versions using Jenkins: library paths 如何将库路径添加到 delphi 项目? - How can I add a library path to a delphi project? 如何自动将范围名称添加到delphi库单元? - How to automatically add the scope name to the delphi library unit? 是否有Delphi库返回项目的所有有效源路径? - Is there a Delphi library which returns all effective source paths for a project? Delphi“工具 - 选项 - 环境选项 - Delphi 选项 - 库 - Win32 - 库路径”(对于 dcu 的)如何在 Delphi 中命名? - How Delphi "Tools - Options - Environment Options - Delphi Options - Library-Win32 - Libary path" (for dcu's) is named in Delphi 10.X (Sydney)? Delphi 2010 IDE可以将相对搜索路径添加到项目中 - Can the Delphi 2010 IDE add relative search paths to a project 德尔福如何与Detours图书馆互动? - How Delphi Interop with Detours Library? Delphi:如何修改库路径? - Delphi: How to modify the Library Path? 如何在Delphi中使用此Hyphenation库? - How to use this Hyphenation library in delphi?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM