[fpc-pascal]Linux RedHat v.8.0, fpc and mysqlclient: /usr/bin/ld: cannot find -lmysqlclient
Marco van de Voort
marcov at stack.nl
Mon Jun 30 23:51:26 CEST 2003
> I am trying to get access to a DataBase in a MySQL server from a Linux RH
> 8.0 machine (I modified the testdb.pp in order to access the DB):
> (from a MS-Win98SE machine I got my program to work using/copying the
> libmySQL.dll into windows\system)
> I have in the linux machine the "mysqlclient9" installed
> (mysqlclient9-3.23.22-8)
> In "/etc/ld.so.conf" I have "/usr/lib/mysql" line. In "/usr/lib/mysql/" I
> have many ".so" files, "libmysqlclient.so" file is there.
Did you run ldconfig?
> And when compilling: fpc testdb.pp
>
> I get:
>
> ..
> ..
> /usr/bin/ld: cannot find -lmysqlclient
> testdb.pp(88,3) Error while linking)
> Closing script ppas.sh
If the above thing still fails, simply add
-Fl/usr/lib/mysql
to your fpc.cfg as an override to the normal ld configuration.
More information about the fpc-pascal
mailing list