简体   繁体   English

为什么我不能在C ++ Builder中将GLScene作为程序包加载?

[英]Why can't I load GLScene as a package in C++Builder?

I am trying to use GLScene (a third-party FireMonkey component for C++Builder and Delphi). 我正在尝试使用GLScene (C ++ Builder和Delphi的第三方FireMonkey组件)。 I downloaded the zip, and in it, among other things, are .bpl files for use in C++Builder. 我下载了zip文件,其中包括.bpl文件,供在C ++ Builder中使用。 When I try to install the package in my project (a C++Builder multi-device application) under Component > Install Packages... > Add, I get this error: 当我尝试在组件>安装软件包...>添加下的项目(C ++ Builder多设备应用程序)中安装软件包时,出现以下错误:

错误:无法加载包...

My directory structure: 我的目录结构:

目录结构和文件

The _Installation directory and the Readme's are not very helpful. _Installation目录和自述文件不是很有帮助。 I have tried the other .bpl files and also tried importing all of them at once, but the same error occurs. 我尝试了其他.bpl文件,也尝试一次导入所有这些文件,但是发生相同的错误。 How do I fix this? 我该如何解决?

There are several problems. 有几个问题。

  • The XE3 extension is suspicious. XE3扩展名可疑。 I just downloaded and unzipped the GLScene download. 我刚刚下载并解压缩了GLScene下载。 The .BPLs in the CBXE3 and CBXE4 seem to be compiled for XE3 and XE4 respectively. CBXE3和CBXE4中的.BPL似乎分别针对XE3和XE4进行了编译。 But packages are version-dependent. 但是软件包是依赖于版本的。

    You should recompile the sources (also included) for 10.2 Tokyo. 您应该重新编译10.2 Tokyo的源(也包括在内)。 Just copy the DelphiXE4 directory to a new directory, and load the .groupproj file or the single .dpk files into the IDE. 只需将DelphiXE4目录复制到新目录,然后将.groupproj文件或单个.dpk文件加载到IDE中。 You might want to change the suffixes (currently XE3 ) of the packages to, say, Tokyo , in the project options, to avoid DLL (or BPL) hell. 您可能希望在项目选项中将软件包的后缀(当前为XE3 )更改为Tokyo ,以避免DLL(或BPL)地狱。

    Also take a look at the pictures in the _Installation directory for the other options that must be set. 还要查看_Installation目录中的图片,了解必须设置的其他选项。 Note that your paths may differ, theirs are just an example. 请注意,您的路径可能有所不同,它们只是一个示例。

  • The compiler needs to be able to find the .bpi and .lib etc. files in order to be able to link. 编译器需要能够找到.bpi.lib等文件才能链接。 Set the directories with those files in the project options, as shown in the _Installation pictures. 在项目选项中使用这些文件设置目录,如_Installation图片所示。

  • The newly compiled .bpl files should be compiled to a directory on the Windows path , so they can be found by the system at runtime. 新编译的.bpl文件应编译到Windows路径上的目录中 ,以便系统在运行时可以找到它们。 In their example setup, (and in the _Installation pictures) that is the shown C:\\Library\\GLScene path. 在他们的示例设置中(以及_Installation图片中),显示的C:\\Library\\GLScene路径。

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

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