简体   繁体   English

尽管存在 BPL,但我收到无法加载包错误

[英]I get a Can't load package error although the BPL is there

This issue is driving me crazy.这个问题快把我逼疯了。 I'm trying to compile and install The QR Designer from QuickReports 6 .我正在尝试从QuickReports 6编译和安装QR Designer I have an issue just with the one package.我只有一个包裹有问题。 When I right the package in the IDE > Install the IDE gives me:当我在 IDE 中正确安装包时,IDE 给了我:

Can't load package C:\xe10_3\QRDesign\Win32\Debug\dclqrd_DXE10_3.bpl.无法加载包 C:\xe10_3\QRDesign\Win32\Debug\dclqrd_DXE10_3.bpl。 The specified module could not be found.指定的模块无法找到。

But the exact file is there.但确切的文件在那里。

I've also tried installing it via the menu under Components > Install Packages and then choosing the BPL from there, with the same issue.我也尝试通过Components > Install Packages下的菜单安装它,然后从那里选择 BPL,但问题相同。

I've tried to use Process Monitor as on this post here to find the issue:我已尝试在此帖子中使用Process Monitor来查找问题:

Delphi Can't load package the specified module cannot be found Delphi Can't load package 找不到指定的模块

I couldn't fix the issue, but what I did pick up from Process Monitor was that some process was looking for the package here:我无法解决这个问题,但我从进程监视器中得到的是一些进程正在这里寻找包:

Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\21.0\Package Cache\dclqrd_DXE10_3.bpl计算机\HKEY_CURRENT_USER\Software\Embarcadero\BDS\21.0\Package Cache\dclqrd_DXE10_3.bpl

That key didn't exists.那把钥匙不存在。 I tried manually creating the key, but that didn't do a thing.我尝试手动创建密钥,但这没有做任何事情。

Any ideas?有任何想法吗?

UPDATE更新

Here is the list of packages:以下是软件包列表:

图片

As you can see, dclqrd_DXE10_3 is dependant on two others.如您所见, dclqrd_DXE10_3依赖于另外两个。 Which I already built and installed.我已经构建并安装了它。 I removed its references and re-added them again now, to make sure the references are sound.我现在删除了它的引用并重新添加了它们,以确保引用是正确的。 I guess its like Remy said, the Specified module not found is probably not referring to dclqrd_DXE10_3 although I don't know what other module it could be referring to.我想就像 Remy 说的那样, the Specified module not found可能不是指dclqrd_DXE10_3虽然我不知道它可能指的是什么其他模块。

To install a package successfully in IDE, follow the steps:要在 IDE 中成功安装软件包,请执行以下步骤:

  • Open the dpk/dproj/groupproj file in IDE在 IDE 中打开 dpk/dproj/groupproj 文件
  • Build the package(s) for Windows 32-bit platform.Windows 32-bit平台构建包。
    IDE itself is a 32-bit applicaton, so it should match. IDE 本身是一个 32 位应用程序,所以它应该匹配。
  • Normally, it will build all dependent/required packages通常,它将构建所有依赖/必需的包
  • Check if all chain of BPL & DCP files are generated in package Output directory .检查是否在包Output directory中生成了所有 BPL 和 DCP 文件链。
    It defaults to $(BDSCOMMONDIR)\Bpl & Dcp folders, but can be changed individually for each Package in Settings.它默认为$(BDSCOMMONDIR)\Bpl & Dcp文件夹,但可以在设置中为每个包单独更改。
    PBL packages are like DLL files. PBL 包就像 DLL 文件。 In order to load them, it requires all dependent BPLs.为了加载它们,它需要所有依赖的 BPL。
  • If you have custom package output paths:如果您有自定义包输出路径:
    • Check if your DCP output path is included in Tools\Options\Language\Delphi\Library Library Path for Windows 32-bit platform检查您的 DCP 输出路径是否包含在Windows 32-bit平台的Tools\Options\Language\Delphi\Library Library Path
    • Check if no duplicates of outdated compiled packages in default $(BDSCOMMONDIR)\Bpl & Dcp directories检查默认$(BDSCOMMONDIR)\Bpl & Dcp目录中是否没有重复的过时编译包
  • Add the paths to library source pas files in Tools\Options\Language\Delphi\Library Browsing path or Library pathTools\Options\Language\Delphi\Library Browsing pathLibrary path中添加库源pas文件的路径
  • In some specific cases, if the package requires some extra dll-s like DB Client libraries, check if these dlls are 32-bit and are loadable, like included in %path% environement variable.在某些特定情况下,如果包需要一些额外的 dll,例如 DB 客户端库,请检查这些 dll 是否为 32 位并且可加载,例如包含在%path%环境变量中。

Note, some libraries offers package installer tools, that automagically do all mentioned things for you.请注意,一些库提供包安装工具,它们会自动为您完成所有提到的事情。
Also, there are universal package installer tools for quick working environement setup in one click.此外,还有通用软件包安装工具,可一键快速设置工作环境。

I don't know why this fixed my issue, but it did.我不知道为什么这解决了我的问题,但确实如此。 The output directories for the bpl and dcp was set to be $(Platform)\$(Config) The project files for the different packages exists in the same folder so the above config was supposed to be the debug folder or the release folder. bpl 和 dcp 的输出目录设置为$(Platform)\$(Config)不同包的项目文件存在于同一文件夹中,因此上述配置应该是调试文件夹或发布文件夹。 Why only this package was thrown off I still don't know, but since changing the above packages to have a fixed path suddenly I could now install dclqrd_DXE10_3.bpl .为什么只有这个包被丢弃我仍然不知道,但由于突然将上述包更改为具有固定路径,我现在可以安装dclqrd_DXE10_3.bpl

Thank you all for helping.谢谢大家的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM