Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-06

Linking error with MySQL on Linux.

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

A.J. Venter

When trying to compile any MySQL apps, including the testdb example I repeatedly get the following error:

Free Pascal Compiler version 1.0.6 [2002/05/23] for i386 Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling insertCodes.pas
insertCodes.pas(11,1) Note: Local variable QBUF not used insertCodes.pas(16,1) Note: Local variable ROWBUF not used insertCodes.pas(17,1) Note: Local variable RECBUF not used Assembling insertcodes
Linking insertcodes
insertCodes.pas(43) Error: Error while linking
Closing script ppas.sh
/usr/bin/ld: cannot find -lmysqlclient

I have tried symlinking libraries, have checked /etc/ld.so.conf to ensure that the mysql libraries were there etc. etc. etc.

Any idea how to tell ld where to find it ?

I am running FPC 1.0.6 on RedHat 7.3 full install.

Ciao
A.J. Venter

Reply by email

Peter Vreman
Show quoted text 9 lines
insertCodes.pas(43) Error: Error while linking Closing script ppas.sh /usr/bin/ld: cannot find -lmysqlclient I have tried symlinking libraries, have checked /etc/ld.so.conf to ensure that the mysql libraries were there etc. etc. etc. Any idea how to tell ld where to find it ? I am running FPC 1.0.6 on RedHat 7.3 full install.

You need to have the mysql-devel package installed. You can check if it is installed with the following command:

rpm -qq mysql-devel

Peter

Reply by email

A.J. Venter
to Peter Vreman

Which returned:
mysql-devel-3.23.49-3

Like I said, I did a full install of RedHat.

The headers are in /usr/include/mysql and the so's in /usr/lib/mysql

I cannot find anything different about the setup.

Ciao
A.J.

Peter Vreman wrote 23 lines
> insertCodes.pas(43) Error: Error while linking > Closing script ppas.sh > /usr/bin/ld: cannot find -lmysqlclient > I have tried symlinking libraries, have checked /etc/ld.so.conf to ensure > that the mysql libraries were there etc. etc. etc. > > Any idea how to tell ld where to find it ? > > I am running FPC 1.0.6 on RedHat 7.3 full install. You need to have the mysql-devel package installed. You can check if it is installed with the following command: rpm -qq mysql-devel Peter _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email