ZeosDBO and C++Builder

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

ZeosDBO and C++Builder

Postby macicogna » Wed Feb 18, 2015 5:54 am

Hi All,

I'm writing an article to BCB Journal about Zeos Database Objects installation in C++Builder. I've used ZeosDBO version 7.2.0 Build 3609, downloaded from the SVN repository. The original manuscript proposal could be seen here: http://bcbjournal.org/forums/viewtopic.php?f=8&t=2590

I've changed the CBuilder12 original packages project files in order to achieve these goals:

  • Reorganize C++ compiled files derived from ZeosDBO's Object Pascal source.
  • Allow more than one version or build to coexist on Windows.
  • For C++Builder XE2 or up, allow multi-platform and config outputs.

I would like to ask some help from this community about testing these packages, mainly with C++Builder XE3 or up. For these IDEs, I suggest to use the CBuilderXE2 attached packages. For your guidance, there is a draft manual about setting up your environment to how to install ZeosDBO attached into the end of this post.

Note:
If you wanna try CBuilder2006 packages, please read the ZeosDBO's forum thread mentioned below.

Any feedback will be appreciated.

This work has started into ZeosDBO's forum and the details are summarized in this tread:
http://zeoslib.sourceforge.net/viewtopi ... 169#p38169

Thank you in advance,

Marcelo A. Cicogna



=============================================================

ZeosDBO
C++Builder Packages Installation Manual


By
Marcelo Augusto Cicogna
HydroByte Software

=============================================================

Goals
- New C++Builder packages.
- Reorganize C++ compiled files derived from ZeosDBO's
Object Pascal source.
- Allow more than one version or build to coexist on
Windows.
- For C++Builder XE2 or up, allow multi-platform and
config outputs.
- Tested with ZeosDBO 7.2 Revision 3609 from SVN.

-------------------------------------------------------------
Notation
[Name]: IDE name or localization tag.
{Path}: Shortcut for paths names.

See APPENDIX A for IDE Names and Localization.

-------------------------------------------------------------
1. C++Builder Version, Platform and Config

a) Unpack ZeosDBO, or get a SVN version, in a folder of
your choice.
Lets call it {ZeosDBOFolder}.

b) Choose your C++Builder version in ZeosDBO "\packages"
folder. For example: "
"{ZeosDBOFolder}\packages\CBuilderXE2".

Lets call this entire path of {CBZeosPath}.

c) For C++Builder XE2 or up.
Choose or check if there is your Platform and Config.
You may have to create the path:
"{CBZeosPath}\{Platform}\{Config}"

By default, C++Builder ZeosDBO packages are set to
Platform = Win32 and Config = Release.

-------------------------------------------------------------
2. IDE Environment Setup

a) Open your IDE.

b) Access IDE's "Environment Variables".

c) Under "System variables" click "Add Override"
and add "{CBZeosPath}\{Platform}\{Config}\Bpl;" to "Path".
See Troubleshoot 6.b.

d) Under "User overrides" create "ZEOSDBO" variable with
value equals to {CBZeosPath} (see Step 1.b).

e) Under IDE's [Include Path] proceed:
Add "$(ZEOSDBO)\{Platform}\{Config}\Include".

Under IDE's [Library Path] proceed:
Add "$(ZEOSDBO)\{Platform}\{Config}\Lib".

See Troubleshoot 6.c.

Note: you can repeat steps c) and e) for multi-platform
or config options that you may use in your projects.

-------------------------------------------------------------
3. Install

a) Open "{CBZeosPath}\ZeosDbo.groupproj" group project.

b) Build all projects.
Note: don't Make all. Build them.
See Troubleshoot 6.c.

c) Right click on "ZComponent{XXX}.bpl" project, in Project
Manager, and choose "Install". If the installation
succeeds, you will receive a dialog confirmation about
the ZeosDBO Installed Components.
See Troubleshoot 6.b.

-------------------------------------------------------------
4. Your Project

a) It is important to check one option in your project that
will use ZeosDBO.
Under [C++ Linker], set or check these option:
"Link with Dynamic RTL" = false;
"Link with the Delphi Runtime Library" = false

In other words, this option must be equal to those found
in ZeosDBO Packages, at IDE's [C++ Linker].
By default, C++Builder ZeosDBO packages set these
options to false.
See Troubleshoot 6.a.


-------------------------------------------------------------
5. Deploy

a) If you are using dynamic build packages, deploy the
"Z*{XXX}.bpl" files, where "{XXX}" relates to CBuilder
Compiler version, with your application.
The packages "Z*{XXX}.bpl" are located in folder:
"{CBZeosPath}\{Platform}\{Config}\Bpl".

-------------------------------------------------------------
6. Troubleshoot

a) Project <Prj.exe> raised exception class <$Address> with
message 'access violation at <0xAddress>: read of
address <0xAddress>

See Step 4 about [C++ Linker] and "Link with Dynamic RTL"
Make sure your project has the same option as ZeosDBO
Packages (by default, Dynamic RTL is set to false).

b) Installing "ZComponent{XXX}.bpl" raises errors about
ZCore.bpl could not be found.

Check if the "{CBZeosPath}\{Platform}\{Config}\Bpl;" was
included into "Path" as determined at Step 2.c.

c) Errors complaining about *.dcu missing files.

Check Step 2.e.
Check Step 3.b.

-------------------------------------------------------------
7. Clean Up

ZeosDBO packages for C++Builder 2009 or up have some
clean up tasks scheduled to post build operation.
See IDE's Post-Build at [Build Events].

For BDS 2006, C++Builder personality, you will find
"PostBuildCleanUp.bat" auxiliary batch.

-------------------------------------------------------------
8. Debug

If you want to debug ZeosDBO source code, take these steps:

a) Setup your IDE Environment.
See Steps 2.c and 2.e.
Under "User overrides" create "ZEOSDBOSOURCE" variable
with value equals to:
"{ZeosDBOFolder}\src"

b) Open "{CBZeosPath}\ZeosDbo.groupproj" group project and
change the "Build Configuration" to "Debug".
Build all projects.
See also Setp 1.c.

c) Under [Debugger], add items to "Source path":
$(ZEOSDBOSOURCE)
$(ZEOSDBOSOURCE)\core
$(ZEOSDBOSOURCE)\plain
$(ZEOSDBOSOURCE)\parsesql
$(ZEOSDBOSOURCE)\dbc
$(ZEOSDBOSOURCE)\component

d) Into your project, with Debug configuration, do:
- Under [C++ Linker] set
"Link with Dynamic RTL" to false.
- Under [Runtime Packages] set
"Build/Link with runtime packages" to false.


=============================================================
APPENDIX

-------------------------------------------------------------
A. IDE Names and Localization

- CBuilder2006

[Include Path] = Include search path (-I):
"Project > Options > C++ Compiler > Paths and Defines"

[Libray Path] = Search Path:
"Tools > Options > Env. Options > C++ Options > Paths and Directories"

[C++ Linker]
"Project > Options > Linker > Linking"

[Runtime Packages]
"Project > Options > Packages"


- CBuilder2009

[Include Path]:
"Tools > Options > Env. Options > C++ Options > Paths and Directories"

[Libray Path]:
"Tools > Options > Env. Options > C++ Options > Paths and Directories"

[C++ Linker]
"Project > Options > C++ Linker"

[Build Events]
"Project > Options > Build Events"

[Debugger]
"Project > Options > Debugger"

[Runtime Packages]
"Project > Options > Packages"


- CBuilderXE2

[Include Path]:
"Tools > Options > Env. Options > C++ Options > Paths and Directories"

[Libray Path]:
"Tools > Options > Env. Options > C++ Options > Paths and Directories"

[C++ Linker]
"Project > Options > C++ Linker"

[Build Events]
"Project > Options > Build Events"

[Debugger]
"Project > Options > Debugger"

[Runtime Packages]
"Project > Options > Packages > Runtime Packages"
Attachments
ZeosDbo-Packages-CBuilderXE2.zip
(36.01 KiB) Downloaded 885 times
ZeosDbo-Packages-CBuilder2009.zip
(25.25 KiB) Downloaded 846 times
ZeosDbo-Packages-CBuilder2006.zip
(39.04 KiB) Downloaded 840 times
User avatar
macicogna
BCBJ Veteran
BCBJ Veteran
 
Posts: 68
Joined: Mon Aug 04, 2008 4:57 pm
Location: Brazil

Return to Technical

Who is online

Users browsing this forum: No registered users and 22 guests