BDS2006 and Zeos installation

两盒软妹~` 提交于 2019-12-12 01:15:18

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/1594565/bds2006-and-zeos-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!