Page 1 of 3

Packages for C++Builder 10.2 Tokyo and beyond

Posted: 19.07.2018, 20:43
by mac_srv
Hi All,

I would like to contribute with project/package files for compiling ZeosLib with new versions of C++Builder.

Yesterday Embarcadero released Communit Edition with resources similar to the Professional version of Delphi and C++Builder, so I think Zeos Lib will increase its number of users considering the limits with DBMS access in PRO versions.

At this moment, I have done packages for Zeos Lib 7.2.4 Stable and I would like to inform and maybe resolve some problems with version 7.3.x (from current SVN).

Also, I could try to help, as a member, in this forum answering doubts about C++Builder packages compilation and usage.

Note: three year ago I've got some help here about this subject, as recorded in this thread:
http://zeoslib.sourceforge.net/viewtopic.php?t=21225

I hope hear from you soon.

Regards,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 20.07.2018, 07:20
by marsupilami
Hello Marcelo,

any help with C++ Builder packages and the like is very much apreciated. I will be happy to integrate new packages into Zeos. Unfortunately I don't know much about C++ Builder since I have no projcts using it. If you need anything in this regard let me know. Please give me some days to look through the other thread and see if these packages have already been integrated.

Best regards,

Jan

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 20.07.2018, 13:56
by mac_srv
Hi Jan,

Thanks for the kind reply.

No rush about this subject.

I've been using ZeosLib with C++Builder since 2015 and this was my idea to contribute with the community.

Note: related to that thread, I have a version for C++Builder 10.2 Tokyo. Maybe we could test this package first (considering Embarcadero's CE release).

Regards,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 31.07.2018, 10:13
by marsupilami
Hello Marcelo,

I downloaded your packages and got them added to my local checkout. Unfortunately Sourceforge SVN seems to have a problem currently...

Anyway - I am always interested in new packages - so yes - the package for 10.2 Tokyo is interesting. I have a License for RAD Studio and out of habit I installed the C++ personality too - so I could at least test if the packages compile. Is there some kind of test application that we can use to confirim if they work? Honestly I have no experience with C++ builder. Just bought it out of habit...

Best regards,

Jan

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 01.08.2018, 19:39
by mac_srv
Hi Jan,

Attached to this message there is the package for CBuilderXE10.2.

I've wrote a simple manual to use it, mainly focused on the use of IDE's Environment Variables and some Troubleshooting.

Actually, this package have a problem when compiling for Win64 platform, using dynamic linking, as I've reported to BCB Journal forum: http://bcbjournal.org/forums/viewtopic. ... e4c4eb4e7e

I'm trying to find a solution to this ilink64 error. Please, if you reproduce this error, let me know.

Also, I'll write a test project in C++ and share with you.

I'm glad to help the community.

Regards,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 18.09.2019, 22:33
by MetaMetal
Sir Marcelo,
Nice to meet you!

I get 7.3-test(from SVN revision 5957) and the attached ZeosDbo-CBuilderXE102.zip and are trying to build for C++Builder 10.2.
The build was successful, with some errors.
(I think that it was corrected so that there might be no problem.)

I tested with DbGrid and it worked fine at design time.
However, an error occurs when trying to build the project.

Error details:

Code: Select all

[bcc32 error] ZVariant.hpp (121): E2019 'operator TZVariant :: :: :: = (const struct &)' cannot be declared in an anonymous union
[bcc32 error] ZVariant.hpp (143): E2019 'operator TZVariant :: :: = (const union &)' cannot be declared in an anonymous union
[bcc32 error] ZDbcOleDBUtils.hpp (39): E2293 ) is required
[bcc32 error] ZDbcOleDBUtils.hpp (40): E2293 ) is required
How can I solve it?
And what information do you need?

Thanks.

MetaMetal

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 20.09.2019, 20:40
by mac_srv
Hi MetaMetal,

My packages seems to be working with the ZeosDBO 7.2.4 stable (https://sourceforge.net/projects/zeosli ... p/download).

This response has two sections:

C++Builder XE2 Pro

I've tested here version 7.3 (revision 5958) with C++Builder XE2 Pro and indeed my packages needs a little fix in order to compile and also install ZeosDBO components.

Here are some steps:
  1. In ZCore project, add "dbrtl.bpi" in the Requires list.
  2. Select ZCore, ZParseSql, ZPlain, ZDbc and ZComponent in the Project Manger (with the Shift Key) and click Build in the popup menu.
  3. Then, select ZComponentDesign and click Install.
Steps 2 and 3 are needed because ZComponentDesign has some cleanup as post Build Events.

This might compile and install ZeosDBO, generating C++ files. See the manual in the ZIP file.

On the other hand, I had a problem with a small test app, with errors in HPP files generated by the Pascal compiler. Here a description:
  • File ZDbcOleDBUtils.hpp
    Error in line 63 complaining about a "expected )".
    It seems this error is due a some other HPP file included in ZDbcOleDBUtils.hpp
An workaround with XE2 is disable OLEDB and ODBC into Zeos.inc:

Code: Select all

{$DEFINE ZEOS_DISABLE_OLEDB}
{$DEFINE ZEOS_DISABLE_ODBC}

C++Builder 10.2.3 Pro

In order to compile ZeosDBO 7.3-test with C++Builder 10.2.3, using my CBuilder10.2 packages, do this:
  1. In ZCore project, add "dbrtl.bpi" in the Requires list.
  2. Need to add new PAS files in each project. I'll do that and post here a new set of projects.
  3. Select ZCore, ZParseSql, ZPlain, ZDbc and ZComponent in the Project Manger (with the Shift Key) and click Build in the popup menu.
  4. Then, select ZComponentDesign and click Install.
But, with my test app I've also reproduced this error:

Code: Select all

[bcc32 error] ZVariant.hpp (121): E2019 'operator TZVariant :: :: :: = (const struct &)' cannot be declared in an anonymous union
I hope other developers see this and help us to keep ZeosDBO working with C++Builder. Also, I'll study an solution for this anonymous union error.

Regards,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 22.09.2019, 08:02
by MetaMetal
Hello Marcelo,
Thank you for your reply.

C++ Builder XE2
I built on XE2. (Needed disable OLEDB and ODBC in Zeos.inc)
The build was successful.

I created a simple project and built it successfully.
But the following option,
> Project - Options - Package - Runtime Package - Link using runtime package
If set to false, the following error occurs.

Code: Select all

[ILINK32 error] Fatal: Cannot open file 'ZCONNPROPERTIES.OBJ'
I don't know why.

C++ Builder 10.2
Does that error still occur?
I hope this problem will be solved.


BTW,
I am a user from C++ Builer 6.
Thank you very much for ZeosLib.
I'm currently using C++ Builder 2010 and I am about to move my project to 10.3.2 Rio.
In the process, I was checking at 10.2 Tokyo.

I hope ZeosLib works properly with C++ Builder 10.3.2 Rio!

Thanks.

MetaMetal

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 23.09.2019, 03:34
by mac_srv
HI MetaMetal,

We were splitting this conversation between IDE versions, but the problem resides in the differences between Zeos 7.2.4-stable and 7.3.0-test.

So, here are a new arrangement.

Zeos 7.2.4-stable
Tested with mine packages and working properly for Win32 with C++ Builder XE2 and C++ Builder 10.2.
When you set "Project - Options - Package - Runtime Package - Link using runtime package" to false you are asking to statically link your code to ZeosDBO's .lib files.

My packages were set to dynamic linking using redistributable .bpl files. For static linking, you can do that:
  1. Start your IDE and remove ZeosDBO from "Component > Intall Packages".
  2. Access the Options for package ZComponentDesign.
  3. Change (delete) the post-built Events that clean .obj files.
  4. Build all and install ZeosDBO again.
I intentionally delete de \Lib\*.obj files in order to not statically link my code by accident. This might happen when the IDE does not have a valid reference for the packages (.bpl files) but also find the .obj files, usually when opening old project files into a new IDE version. Maybe in the final version of the packages I'll remove this cleanup from the post-build events.

Zeos 7.3.0-test
I think it is too soon to put Zeos aside when using C++Builder. It seems that it is a small problem with new BCD types that they are trying. These nested type records are raising problems with the auto-generated HPP files. But, I think they can change some types in order to make them C++Builder friendly. ZeosDBO/ZeosLib are a very inclusive community.
For example, to manually (not recommended) understand the "cannot be declared in an anonymous union" error, try to give a name like "ABigDecimal" to the struct using TBcd in "ZVariant.hpp":

Code: Select all

struct ABigDecimal  //<-- Change here to test error
{
  Data::Fmtbcd::TBcd VBigDecimal;
};
I just don't know how to change the original Object Pascal code in order to create this name. I think it might ask for a new arrangement of TZVariant record.

For reference:

Code: Select all

TZVariant = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif} record
    VType: TZVariantType;
    VString: String;
    {$IFNDEF NO_ANSISTRING}
    VAnsiString: AnsiString;
    {$ENDIF}
    VRawByteString: RawByteString;
    {$IFNDEF NO_UTF8STRING}
    VUTF8String: UTF8String;
    {$ENDIF}
    VUnicodeString: ZWideString;
    VBytes: TBytes;
    VInterface: IZInterface;
    case TZVariantType of
      vtBoolean: (VBoolean: Boolean);
      vtInteger: (VInteger: Int64);
      vtUInteger: (VUInteger: UInt64);
      vtDouble: (VDouble: Double);
      vtCurrency: (VCurrency: Currency);
      vtBigDecimal: (VBigDecimal: TBCD);               //<-- Here
      vtTimeStamp: (VTimeStamp: TZTimeStamp);
      vtGUID: (VGUID: TGUID);
      {$IFDEF BCC32_vtDateTime_ERROR}
      vtDateTime: (VDateTime: Double);
      {$ELSE}
      vtDateTime: (VDateTime: TDateTime);
      {$ENDIF}
      vtPointer: (VPointer: Pointer);
      vtCharRec: (VCharRec: TZCharRec);
      vtArray: (VArray: TZArray);
  end;

BTW
I'm a C++Builder user since version 1 and ZeosDBO/ZeosLib is important for some projects here too. It is nice to have other using and testing Zeos with C++Builder. I'm glad If my packages can help.

Regards,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 23.09.2019, 08:21
by marsupilami
Hello Marcelo,
mac_srv wrote:My packages seems to be working with the ZeosDBO 7.2.4 stable (https://sourceforge.net/projects/zeosli ... p/download).
I am currently preparing a Zeos 7.2.6 subrelease. Could you check if your packages work with the current Zeos 7.2 SVN branch? I really would like to include them in that release.

Best regards,

Jan

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 23.09.2019, 14:49
by mac_srv
Hi Jan,

Sure, I'm glad to help.

I've checked-out version 7.2 from SVN and I can see my CBuilder* packages there.

I'll test and reply to you soon.

Best,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 23.09.2019, 16:09
by mac_srv
Hi Jan,

I'm looking here and the "CBuilder*" packages in version 7.2.6 (SVN) are old ones, maybe from this thread (http://zeoslib.sourceforge.net/viewtopi ... 527#p37527).

They have path automation like "$(ZEOSDBO)\$(Platform)\$(Config)\" for Bpl, Include and Lib folders, but they do not have ZComponentDesign package and they are not using the "LIB suffix" also.

I've been working and improving these packages since then, mainly with 7.2.4 stable version. Can I test then with src 7.2.6 and send to you as attachments in this thread?

I can supply packages and tests for:
  • Delphi2006 //As a BDS2006 personality that will generate C++Builder 2006 files
  • CBuilder2009
  • CBuilderXE2
  • CBuilderXE10.2
I'll wait your reply.

Best,

Marcelo.

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 24.09.2019, 08:31
by marsupilami
Hello Marcelo,

sure - I will be happy to upload your packages. Just attach them here.
Best regards,

Jan

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 24.09.2019, 12:11
by MetaMetal
Hello Marcelo,
Thank you for your reply.

I'm sorry. I was a little impatient.
I missed the "My packages seems to be working with the ZeosDBO 7.2.4 stable" part.

It's about the ZeosLib version, not the IDE version.

Zeos 7.2.4-stable
It worked with 10.2.3 Tokyo without problems! (Edit: I tested Win32 only.)
The .obj file problem is also perfect.

10.3.2 Rio will be tested now. Please give me some time.


Zeos 7.3.0-test
It seems that using this version was too early.
I will wait for 7.2.6-stable.


I may not be able to contribute anything, but I can test it.

Thanks.

MetaMetal

Re: Packages for C++Builder 10.2 Tokyo and beyond

Posted: 24.09.2019, 15:26
by MetaMetal
Hi,

An error occurred in 10.3.2 Rio.

In building ZComponentDesign.cbproj:

Code: Select all

[ilink32 warning] Warning: CODE                : 0x00000267 / 0x01000000
[ilink32 warning] Warning: DATA                : 0x00000125 / 0x01000000
[ilink32 warning] Warning: DEBSYM              : 0x0000000e / 0x01000000
[ilink32 warning] Warning: Extdef flags        : 0x00000026 / 0x00008000
[ilink32 warning] Warning: Extdefs             : 0x00000098 / 0x00008000
[ilink32 warning] Warning: Import symbols      : 0x00000000 / 0x00100000
[ilink32 warning] Warning: OBJ symbols         : 0x00000d34 / 0x00400000
[ilink32 warning] Warning: Public GSX          : 0x00003edc / 0x000c0000
[ilink32 warning] Warning: Publics             : 0x000235bc / 0x000c0000
[ilink32 warning] Warning: SegRelocs           : 0x00000708 / 0x00800000
[ilink32 warning] Warning: StringBlock         : 0x0000002b / 0x01000000
[ilink32 warning] Warning: Virdefs             : 0x00000008 / 0x00020000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilc: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ild: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilf: 0x00020000 / 0x0a000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ils: 0x00780000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.tds: 0x00010000 / 0x09400000
[ilink32 warning] Warning: Extdef flags        : 0x00000000 / 0x00008000
[ilink32 warning] Warning: Extdefs             : 0x00000000 / 0x00008000
[ilink32 warning] Warning: Import symbols      : 0x00000000 / 0x00100000
[ilink32 warning] Warning: OBJ symbols         : 0x00000000 / 0x00400000
[ilink32 warning] Warning: Public GSX          : 0x00000940 / 0x000c0000
[ilink32 warning] Warning: Publics             : 0x00005340 / 0x000c0000
[ilink32 warning] Warning: StringBlock         : 0x00000013 / 0x01000000
[ilink32 warning] Warning: Virdefs             : 0x00000000 / 0x00020000
[ilink32 warning] Warning: unknown heap name   : 0x08000000 / 0x08000000
[ilink32 warning] Warning: An error was detected (LIB266)
[ilink32 warning] Warning: Unable to perform incremental link-executing full link ...
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilc: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ild: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilf: 0x00020000 / 0x0a000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ils: 0x00780000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.tds: 0x00010000 / 0x09400000
[ilink32 warning] Warning: CODE                : 0x00000267 / 0x01000000
[ilink32 warning] Warning: DATA                : 0x00000125 / 0x01000000
[ilink32 warning] Warning: DEBSYM              : 0x0000000e / 0x01000000
[ilink32 warning] Warning: Extdef flags        : 0x00000026 / 0x00008000
[ilink32 warning] Warning: Extdefs             : 0x00000098 / 0x00008000
[ilink32 warning] Warning: Import symbols      : 0x00000000 / 0x00100000
[ilink32 warning] Warning: OBJ symbols         : 0x00000d34 / 0x00400000
[ilink32 warning] Warning: Public GSX          : 0x00003edc / 0x000c0000
[ilink32 warning] Warning: Publics             : 0x000235bc / 0x000c0000
[ilink32 warning] Warning: SegRelocs           : 0x00000708 / 0x00800000
[ilink32 warning] Warning: StringBlock         : 0x0000002b / 0x01000000
[ilink32 warning] Warning: Virdefs             : 0x00000008 / 0x00020000
[ilink32 warning] Warning: unknown heap name   : 0x08000000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilc: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ild: 0x00010000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ilf: 0x00020000 / 0x0a000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.ils: 0x00780000 / 0x08000000
[ilink32 warning] Warning: C:/Program Files (x86)/Embarcadero/Studio/20.0/zeoslib/packages/CBuilderXE102/Win32/Release/Bpl/ZComponentDesign250.tds: 0x00010000 / 0x09400000
[ilink32 warning] Warning: Extdef flags        : 0x00000000 / 0x00008000
[ilink32 warning] Warning: Extdefs             : 0x00000000 / 0x00008000
[ilink32 warning] Warning: Import symbols      : 0x00000000 / 0x00100000
[ilink32 warning] Warning: OBJ symbols         : 0x00000000 / 0x00400000
[ilink32 warning] Warning: Public GSX          : 0x00000940 / 0x000c0000
[ilink32 warning] Warning: Publics             : 0x00005340 / 0x000c0000
[ilink32 warning] Warning: StringBlock         : 0x00000013 / 0x01000000
[ilink32 warning] Warning: Virdefs             : 0x00000000 / 0x00020000
[ilink32 warning] Warning: unknown heap name   : 0x08000000 / 0x08000000
[ilink32 warning] Warning: An error was detected (LIB266)
[ilink32 error] Error: Unable to execute link
Failure
Win64 fails to build on both 10.2.3 Tokyo and 10.3.2 Rio.

Code: Select all

[ilink64 error] Error: Unresolved external 'Zmessages::STokenizerIsNotDefined' referenced from C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\20.0\ZEOSLIB\PACKAGES\CBUILDERXE102\WIN64\RELEASE\LIB\ZSCRIPTPARSER.O
Marcelo has no problem with 10.2.3 Tokyo Win64, right?

I will try a little more.

Thanks.

MetaMetal