[Lazarus] Lazarus & MySQL 5.1

Marco van de Voort marcov at stack.nl
Tue Mar 2 20:11:28 CET 2010


On Tue, Mar 02, 2010 at 02:59:12PM +0000, Henry Vermaak wrote:
> > seems to have fallen from the air, connecting to nothing ?
> 
> I presume it comes from here (in mysql.inc):
> 
>   const
>     mysqllib = 'libmysqlclient.'+sharedsuffix;
>   {$IF DEFINED(mysql50)}
>     mysqlvlib = mysqllib+'.15';
>   {$ELSEIF DEFINED(mysql41)}
>     mysqlvlib = mysqllib+'.14';
>   {$ELSE}
>     mysqlvlib = mysqllib+'.12';
>   {$ENDIF}
> 
> This probably doesn't cover all the cases.  Assuming that a specific
> client library can only talk to a specific server may also be wrong.
> Debian testing also has libmysqlclient 16 and mysql-server 5.1.

mysql version is a disaster (and one of the reasons why I avoid mysql when I
can). IMHO FPC should never hardcode the number in the first place, but
should link to mysqlclient.so (using the symlink, the unix way).

Anyway, long story short, FPC has a provision for such mistakes, -XLA

Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray.





More information about the Lazarus mailing list