[fpc-pascal]Error compiling testdb.pp example (mysql)

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sat Jun 14 17:01:38 CEST 2003


On Sun, 15 Jun 2003, James Mills wrote:

> On Sat, Jun 14, 2003 at 04:08:38PM +0200, Michael.VanCanneyt at Wisa.be wrote:
> >
> >
> > On Sat, 14 Jun 2003, James Mills wrote:
> >
> > > $ fpc testdb
> > > Free Pascal Compiler version 1.0.6 [2002/08/10] for i386
> > > Copyright (c) 1993-2002 by Florian Klaempfl
> > > Target OS: Linux for i386
> > > Compiling testdb.pas
> > > Assembling qtest
> > > Linking testdb
> > > testdb.o(.text+0xaa): In function `program_init':
> > > : undefined reference to `mysql_connect'
> > > testdb.pas(84,3) Error: Error while linking
> > > Closing script ppas.sh
> > >
> > > What have I done wrong here ? ...
> > > Yes I have installed the appropiate libmysqlclient-dev (from debian).
> >
> > It is not the correct version of mysql. Please check what the mysql_version
> > unit reports as a version, and what the version is of the installed mysql.
>
> How on earth do I do that :P ?

Simple:

program ver;

uses mysql_version;

begin
  Writeln(MYSQL_SERVER_VERSION);
end.

and
  cat /usr/include/mysql/mysql_version.h

Should tell you what is installed.

Michael.





More information about the fpc-pascal mailing list