[bug_fixed] Compiling in Borland C++ Builder 6

In this forum all bug reports concerning the 6.x branch will be gahtered. You have the possibility to track the bug fix process.

Moderators: EgonHugeist, mdaems

Post Reply
fred_nd
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 06.04.2006, 17:37

[bug_fixed] Compiling in Borland C++ Builder 6

Post by fred_nd »

Today I compiled the rev 79 from mdaems in Borland C++ Builder, and had some troubles.

I havent checked the SVN since I did not find any info on how to do that ;) so possibly the errors are already fixed there?

1.
Access Violation in dcc60.dll when compiling ZPlainMysqlConstants.pas, fixed this by changing the buffer_type from TMysqlFieldTypes to Integer in the MYSQL_BIND2 record (and changing so that each project handles enums as integers.

Is seems that the BCB6 delphi compiler do not like enums with fixed values, since this is the line that caused the problem:
MYSQL_TYPE_NEWDECIMAL{$IFNDEF VER130}=246{$ENDIF},
Removing the =246 would also remove the problem, but that would not fix the code ;)

2.
Then I had problems with Access Violations on Opening connections for MySQL 4.0, 3.x..., this because mysql_server_init does not exist in those DLL files. I just added:
if @MYSQL_API.mysql_server_init <> nil then
to each of the .Init functions of ZPlainMySqlDriver.pas.

3.
I also had some problems with corrupted files in the .zip files from mdaems, in the .7z there was no problem with the files. This may be some problem with TUGZip that I use for unpacking files.

Now everything seems to work for now, but I will not be using this code in anything non-beta for now ;)

Thanks.
/Fred
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Fred,

These errors are AFAIK not fixed yet. I use SVN with TortoiseSVN and get the testing branch using following url : svn://www.firmos.at/zeos/branches/testing

1. I think this enum construct is not really used yet (none of the elements are used). And it can't be used in the future anyway as this wouldn't work out very well with all compilers. So I'll remove the constant. In fact there's written some code that's 'wrong' as there is a reference to some enum that's just used as an integer. Maybe we better change this code altogether.(change the enumtype to an integer type)
2. I did this change. It's the safest way to handle this.
3. It may also be a problem because I create the zip file with 7-zip orbecause I use 'ultra' compression level.

BTW. I commited this to SVN(rev91). I made some new packages today but the do not include your changes yet.

Can you confirm this is working so I can close this bug report?

Mark
Post Reply