Show quoted text 38 lines
On Sun, 15 Jun 2003, James Mills wrote:
> On Sat, Jun 14, 2003 at 04:08:38PM +0200, 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.
Okay I didn't know such a unit existed :)
Here's the info you wanted...
cheers
James
$ fpc test
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 test.pas
Assembling ver
Linking test
8 Lines compiled, 1.0 sec
Sun Jun 15 01:05:14
~
$ ./test
3.21.28-gamma
Sun Jun 15 01:05:15
~
$ mutt
Mailbox is unchanged.
Sun Jun 15 01:05:27
~
$ cat /usr/include/mysql/mysql_version.h
/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
This file is public domain and comes with NO WARRANTY of any kind */
/* Version numbers for protocol & mysqld */
#ifndef _mysql_version_h
#define _mysql_version_h
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
#define PROTOCOL_VERSION 10
#define MYSQL_SERVER_VERSION "4.0.13"
#ifndef MYSQL_SERVER_SUFFIX
#define MYSQL_SERVER_SUFFIX ""
#endif
#define FRM_VER 6
#define MYSQL_VERSION_ID 40013
#define MYSQL_PORT 3306
#define MYSQL_UNIX_ADDR "/var/run/mysqld/mysqld.sock" #define MYSQL_CONFIG_NAME "my"
/* mysqld compile time options */
#ifndef MYSQL_CHARSET
#define MYSQL_CHARSET "latin1"
#endif /* MYSQL_CHARSET */
#endif /* _CUSTOMCONFIG_ */
#endif /* _mysql_version_h */
Show quoted text 12 lines
-
- James Mills
Zero Defect Software Engineers Group - ZDSEG