Hi Michal,
This is a report about BDS 2006, aiming to compile and install in C++Builder.
I'll show my results as an item-based report.
1. Existing Delphi2005 Package
If you open the Delphi2005's project group into BDS 2006, with Delphi personality, you are able to compile and install ZeosDBO without any problem. So, you can use ZeosDBO with Delphi projects swimmingly.
2. New Delphi2006 Package
In order to compile in C++Builder, I've saved Delphi2005 folder as Delphi2006, opened it and tried to change the Linker option to "Generate All C++ Builder Files". This actions let me found the first problem, as described into the next sub-item.
2.1. Problem with Delphi Precompiler.
I've found a problem with BDS 2006 when editing Delphi the options of projects that use precompiler {$IFDEF SOMETHING}...{$ENDIF}. I was able to verify this problem with *.dpk Delphi files that use precompiler instructions, like ZPlain.dpk, ZDbc.dpk, ZParseSql.dpk and ZComponent.dpk. I've discovered, at least on my BDS 2006 installation, that those lines using the Delphi Precompiler are ignored, so the "Contains" list shown in Project Manager just present lines that are outside precompiler instructions.
In order to continue, I've removed all precompiler instructions, eliminating the Zeos.inc DBMS options that permit to reduce final binary files on *.bpk include/exclude filters. You can check this task into the attached Delphi2006 *.dpk files.
So, I was able to open Delphi2006 group project again and try a "Build all projects" task. After that, I've found new problems, as described into the next sub-item.
2.2. Access violation in module 'dcc100.dll'.
With BDS 2006 Delphi personality, the building progress stops at ZPlain.dpk project with this error message: "Access violation at address 22028FB3 in module 'dcc100.dll'. Read of address 00000018.".
I've tried such an effort reading Google results and testing options and do not realize the source of this problem. The best reference about this error was
http://stackoverflow.com/questions/1533 ... error-la33.
Also I was able to discover that " ZPlainMySqlConstants.pas " was not processed properly, in order to generate the .hpp header file. The header stops at:
Code: Select all
...
struct LIST
{
public:
LIST *prev;
LIST *next;
So, with my previous experience creating and compiling a ZeosDBO's CBuilder2006 problematic package, I've decided to eliminate MySQL files from all packages. So, I've commented those lines into dpk files:
Code: Select all
[ZPlain.dpk]
{ZPlainMySqlDriver in '..\..\src\plain\ZPlainMySqlDriver.pas',
ZPlainMySqlConstants in '..\..\src\plain\ZPlainMySqlConstants.pas',}
[ZDbc.dpk]
{ZDbcMySql in '..\..\src\dbc\ZDbcMySql.pas',
ZDbcMySqlMetadata in '..\..\src\dbc\ZDbcMySqlMetadata.pas',
ZDbcMySqlResultSet in '..\..\src\dbc\ZDbcMySqlResultSet.pas',
ZDbcMySqlStatement in '..\..\src\dbc\ZDbcMySqlStatement.pas',
ZDbcMySqlUtils in '..\..\src\dbc\ZDbcMySqlUtils.pas',}
I've build again and had to comment these lines into "ZAbstractConnection.pas":
Code: Select all
...
{{$IFDEF ENABLE_MYSQL}
{ ZDbcMySql,
{{$ENDIF}
With these modifications, I was able to compile and install ZeosDBO with Linker option "Generate All C++ Builder Files". Besides, with the generated *.hpp, *.bpi, *.lib and *.bpl files, I was able to test ZeosDBO components with C++Builder personality.
3. New CBuilder2006 Package
With this report in mind, I've improved my CBuilder2006 packages and had success compiling and installing ZeosDBO into C++Builder personality, without Delphi generated files, but deleting the MySQL files listed in sub-item 2.2. These new packages projects redirects output to "\Bpl", "\Include" and "\Lib" folders, as I did with CBuilder2009 and CBuilderXE2.
4. Conclusions
I don't know if somebody can reproduce these results, but my conclusion is that BDS 2006 breaks trying to compile "\plain\ZPlainMySqlConstants.pas".
I know this is a legacy problem, since C++Builder 2009 and XE2 don't reach any problem with this file.
Also, I've talked with BCB Journal's editor about ZeosDBO and they have interest on this subject. They are willing to test my packages and give some feedback. So, the final task could be a formalized article about this experiences with ZeosDBO and C++Builder.
I apologize about the length of this report, but I think these results might help others C++Builder users.
Regards,
Marcelo