BDS2006和Zeos安装

发布于 2024-08-08 12:41:04 字数 558 浏览 13 评论 0原文

我最近在 BDS2006 上为 Delphi 和 C++ 个性安装了 Zeos 6.6 稳定版。

为此,由于 Zeos 是用 Delphi 编写的,因此我在构建包时选中了“生成所有 C++ Builder 文件”。

我发现的问题是,不知何故,并非所有必需的 .DCU 都是在构建不同包的过程中生成的。我最终解决了这个问题,首先只为 Delphi 构建(工作完美),然后为 Delphi 和 C++ 重建。

现在,我不确定这是否是一个错误(在 Quality Central 或 Google 中没有找到类似的内容) )或者它仅影响 BDS2006 或其他 IDE。所以,问题是:任何人都可以告诉我什么可能会导致编译器在选中“生成所有 C++ Builder 文件”时构建所有 .DCU,但在不选中“生成所有 C++ Builder 文件”时会这样做吗?

提前致谢并致以最诚挚的问候

I recently installed Zeos 6.6 stable on BDS2006 for both the Delphi and C++ personalities.

In order to do so, and since Zeos is written in Delphi, I checked the "Generate all C++ Builder files" when building the packages.

The problem I found was that, somehow, not all necessary .DCUs were generated during the building of the different packages. I finally worked around it by first building only for Delphi (which worked flawlessly) and then rebuilding for both Delphi and C++.

Now, I am not sure if this is a bug at all (did not find anything similar in Quality Central or Google) or it affects only BDS2006 or other IDEs too. So, question is: anyone can tell me what could cause the compiler not to build all the .DCU when "Generate all C++ Builder files" is checked, but do it when not?

Thanks in advance and best regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

就是爱搞怪 2024-08-15 12:41:04

这是我在 Zeos 论坛 中撰写的关于如何解决此问题的文章的摘录。希望它对其他人有帮助。

  • 注意:这可能适用于 BDS2005、RAD2007 和其他 IDE 版本,也可能不适用。我无法测试它,因为我没有安装它。

  • 免责声明:这些步骤可能不是最准确或最有效的。请随时评论您发现的任何错误或问题,我将更新帖子。

  • 免责声明 2:这些步骤意味着在某一时刻篡改注册表。它在我的系统中有效,但在您的系统中可能无效。这样做的风险由您自己承担。

通过以下步骤,我成功地为 Delphi 和 C++ 个性安装了 Zeos:

  1. 摆脱任何先前的 Zeos 安装。其中包括您能找到的任何 Zeos .BPL、.DCU 和 .LIB。
  2. 将 Zeos 解压到您选择的目录中。
  3. 打开BDS2006,选择Delphi10的包并编译所有包。这样我们就拥有了所有的.DCU。由于某种原因,并非所有这些都在步骤 6 中正确创建(见下文)。
  4. 关闭 BDS2006。在步骤 5 之前执行此操作非常重要。
  5. 删除注册表项,如 Delphi 软件包未出现在 C++ 中
  6. 打开 BDS2006。再次打开 Delphi10 的包组。对于所有包,请转到“选项”->“链接器”并选择“生成所有 C++ Builder 文件”。再次编译它们。如果它抱怨 {$ENDIF;},只需删除它即可。如果在编译 Component.bpl 或 ComponentDesign.bpl 时,编译器抱怨某些 .DCU,则应通过添加来解决
    构建目录(所有包都内置于此)到包的搜索路径。
  7. 安装componentDesign.bpl
  8. 在Tools-Option中添加BDS的必要路径,对于C++和Delphi个性:
    • packages\delphi10 // 这里有一些标头
    • packages\delphi10\build // 一些 .dcu
    • src\组件
    • src\核心
    • src\dbc
    • src\parsesql
    • src\plain

仅供参考,步骤 5 中所需的键如下:

  • 键:HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Known Packages。查找 [path]\MyPackage.bpl 条目并将其删除。
  • 键:HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Package Cache。
    查找名为 MyPackage.bpl 的项并删除整个子项。
  • 键:HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Palette\Cache。查找名为 MyPackage.bpl 的项并删除整个子项。 BDS 中存在一个错误,会在编译时影响软件包。有关更多信息,请参阅提到的博客。

您现在应该已经安装了 Zeos,并且可以同时用于 Delphi 和 C++。

注意:在 C++ 中编译时,可能会出现错误,因为它找不到某些 .h。通常,可以通过将 #include 更改为 .hpp 来解决此问题。

This is an extract of an article I wrote in the Zeos forums regarding how I solved this problem. Hope it helps someone else.

  • NOTE: this may apply or not for BDS2005, RAD2007 and other IDE versions. I can not test it since I have none installed.

  • DISCLAIMER: these steps may not be the most accurate or efficient ones. Please feel free to comment any error or problem you can find and I will update the post.

  • DISCLAIMER 2: these steps imply tampering with the registry at one point. It worked in my system but may not in yours. Do it at your own risk.

With the following steps I managed to install Zeos for both Delphi and C++ personalities:

  1. Get rid of any prior Zeos installations. That includes any Zeos .BPL, .DCU and .LIB you can find.
  2. Extract Zeos to the directory of your election.
  3. Open BDS2006, select the package for Delphi10 and compile all packages. This way we will have all .DCUs. For some reason not all of them get created correctly in step 6 (see below).
  4. Close BDS2006. It is very important to do this before step 5.
  5. Delete the registry keys as indicated in Delphi packages not appearing in C++
  6. Open BDS2006. Open again the package group for Delphi10. For all the packages go to Options->Linker and select "Generate all C++ Builder Files". Compile them all again. If it complains regarding an {$ENDIF;} just delete it. If when compiling Component.bpl or ComponentDesign.bpl, the compiler complains about some .DCU it should be solved by adding
    the Build directory (where all packages get built into) to the Search path of the package.
  7. Install componentDesign.bpl
  8. Add the necessary paths to BDS in Tools-Option, both for C++ and Delphi personalities:
    • packages\delphi10 // some headers here
    • packages\delphi10\build // some .dcu
    • src\component
    • src\core
    • src\dbc
    • src\parsesql
    • src\plain

Just for info the keys you need in step 5 are following:

  • Key: HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Known Packages. Look for the entry with [path]\MyPackage.bpl and remove it.
  • Key: HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Package Cache.
    Look for the key called MyPackage.bpl and remove the entire sub-key.
  • Key: HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Palette\Cache. Look for the key called MyPackage.bpl and remove the entire sub-key. There is a bug in the BDS that affects packages when compiled. See the mentioned blog for more info.

You should have Zeos installed and working for both Delphi and C++ now.

NOTE: when compiling in C++ it may give you an error because it can not find some .h. Usually this gets solved by changing the #include to .hpp.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文