[fpc-pascal]mysql on windows
fsl at centroin.com.br
Thu May 31 21:48:03 CEST 2001
> > I have the Windows version of MySQL installed but cannot link the
> testdb.pp example suplied with fpc-1.0.4 for
> > Windows. I tells it cannot find -lmysqlclient...
> > My ppc396.cfg is points to the lib directory of my Mysql installation.
> Using the debuging options from ppc386 and
> > ldw I could find it is looking for libmysqlclient.a and not
> mysqlclient.lib as suplied with mysql. I tried creating a copy
> > using the name expected by the linker, and now it complains it cannot
> find -lm. :-(
> There is supposed to be a DLL called libmysql.dll that should probably be
> copied from the MySQL installation to the Windows System directory. Oddly
> though, not all distribution packages of MySQL for Windows has this DLL
> included. I managed to get the DLL from an older distribution of MySQL and
> it seems to work fine with the current version.
My installation of MySQL includes libmysql.dll, but it is not enough. MySQL docs tell you must link against libmysql.lib to use libmysql.dll, so I tried this, renaming libmysql.lib to libmysqlclient.a as fpc looks for. The result is the same as before, ldw complains about missing -lm.
Maybe you have a complete cygwin32 environment installed or some other package that provides libm.a just like an Unix OS would.
s, Fernando Lozano
More information about the fpc-pascal