FieldNameQuoteChars not defined with fpc 2.4.2 build?

3 posts / 0 new
Last post
AB1KW
AB1KW's picture
FieldNameQuoteChars not defined with fpc 2.4.2 build?

On Fedora 15, compiling with these versions of Lazarus and Freepascal, I get the error below:

lazarus-0.9.30-1.fc15.x86_64
fpc-2.4.2-2.fc15.x86_64

Compiling ./mysql/mysql51conn.pas
100 141.728/144.032 Kb Used
200 141.883/144.192 Kb Used
300 142.123/144.480 Kb Used
mysqlconn.inc(323,5) Note: Local variable "esc_str" not used
mysqlconn.inc(334,5) Note: Local variable "esc_str" not used
400 142.711/144.992 Kb Used
mysqlconn.inc(417,3) Note: Local variable "ClientVerStr" is assigned but never used
500 143.080/145.376 Kb Used
600 143.313/145.664 Kb Used
700 143.545/145.856 Kb Used
800 143.988/146.304 Kb Used
900 144.227/146.528 Kb Used
1000 144.603/146.976 Kb Used
mysqlconn.inc(1007,22) Error: Identifier not found "FieldNameQuoteChars"
1100 144.660/146.976 Kb Used
mysql51conn.pas(11,1) Fatal: There were 1 errors compiling module, stopping
ERROR: failed compiling of project /data/rpm/BUILD/cqrlog-1.1.0/src/cqrlog.lpi

And sure enough, going up to the definition of FieldNameQuoteChars on line 74 of mysqlconn.pas, there is a definition that makes FieldNameQuoteChars only defined when compiling with version 2.4.0:

{$IFDEF VER2_4_0}
FieldNameQuoteChars : TQuoteChars;
{$ENDIF}

Should there be a similar thing so FieldNameQuoteChars is also defined on 2.4.2 (and 2.4.1?) or are the newer versions supposed to define FieldNameQuoteChars somewhere else and am I running into another bug?

AB1KW
AB1KW's picture
And sure enough, an ugly (and

And sure enough, an ugly (and wrong) patch to change the VER2_4_0 to VER_2_4_2 results in cqrlog compiling...

I'm not sure what the pascal syntax for the correct fix is, so I won't even bother attaching that horrible patch :)

Where can I email the cqrlog spec file, for inclusion in the cqrlog project?

ok2cqr
ok2cqr's picture
Re: FieldNameQuoteChars not defined with fpc 2.4.2 build?

The same problem is with openSUSE. They also have fpc-2.4.2 but not complete. This 2.4.2 version in SVN includes also support for connection to MySQL 5.1 unfortunately packages from Fedora/openSUSE don't have it. Because I want to compile CQRLOG also on Ubuntu 10.04 I moved new db support to cqrlog source tree. FieldNameQuoteChars variable is redeclared again in cqrlog source code and this is not needed in newer fpc compilers versions.