[fpc-pascal]Error compiling testdb.pp example (mysql)
$ 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). cheers James -- - - James Mills Zero Defect Software Engineers Group - ZDSEG ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
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. Michael. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
On Sat, Jun 14, 2003 at 04:08:38PM +0200, [EMAIL PROTECTED] 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 ? cheers James > > Michael. > > > ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- - - James Mills Zero Defect Software Engineers Group - ZDSEG ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
On Sun, 15 Jun 2003, James Mills wrote: > On Sat, Jun 14, 2003 at 04:08:38PM +0200, [EMAIL PROTECTED] 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. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
On Sat, Jun 14, 2003 at 05:01:38PM +0200, [EMAIL PROTECTED] wrote: > > > On Sun, 15 Jun 2003, James Mills wrote: > > > On Sat, Jun 14, 2003 at 04:08:38PM +0200, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] Sun Jun 15 01:05:14 ~ $ ./test 3.21.28-gamma [EMAIL PROTECTED] Sun Jun 15 01:05:15 ~ $ mutt Mailbox is unchanged. [EMAIL PROTECTED] 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 #else #define PROTOCOL_VERSION10 #define MYSQL_SERVER_VERSION"4.0.13" #ifndef MYSQL_SERVER_SUFFIX #define MYSQL_SERVER_SUFFIX "" #endif #define FRM_VER 6 #define MYSQL_VERSION_ID40013 #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 */ > > and > cat /usr/include/mysql/mysql_version.h > > Should tell you what is installed. > > Michael. > > > ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- - - James Mills Zero Defect Software Engineers Group - ZDSEG ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
On Sun, 15 Jun 2003, James Mills wrote: > On Sat, Jun 14, 2003 at 05:01:38PM +0200, [EMAIL PROTECTED] wrote: > > > > > > On Sun, 15 Jun 2003, James Mills wrote: > > > > > On Sat, Jun 14, 2003 at 04:08:38PM +0200, [EMAIL PROTECTED] 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... Correction: the info which you need :-) Seems that you have mysql version 4 installed. The units we distribute standard work with MySQL 3.23. There are units for mysql version 4 as well, but you must compile and install them separately. Get the sources of the packages , and look in packages/base/mysql/mysql4 I warn against using mysql with FPC. Their API changes quite often in incompatible ways, which can be masked with C macros but which cannot be masked with Pascal functions. Try and use firebird instead is my usual advice. Michael. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]/usr/lib/fpc/1.0.6/ppc386 vs. /usr/bin/fpc vs. fpc.cfg?
Are there known issues with 1.0.6 and it's finding the configuration file? Does it matter whether I compile using the 'fpc' or 'ppc386' command (they differ on my system): [EMAIL PROTECTED] ian]$ more ~amead/fpc.cfg -gl -Co -Cr [EMAIL PROTECTED] ian]$ ls -l `which ppc386` lrwxrwxrwx1 root root 25 May 17 08:49 /usr/bin/ppc386 -> /usr/lib/fpc/1.0.6/ppc386* [EMAIL PROTECTED] ian]$ ls -l `which fpc` -rwxr-xr-x1 root root78020 May 23 2002 /usr/bin/fpc* [EMAIL PROTECTED] ian]$ ls -l /usr/lib/fpc/1.0.6/ppc386 -rwxr-xr-x1 root root 897844 May 23 2002 /usr/lib/fpc/1.0.6/ppc386* [EMAIL PROTECTED] ian]$ rpm -qf /usr/bin/fpc fpc-1.0.6-1 [EMAIL PROTECTED] ian]$ rpm -qf /usr/lib/fpc/1.0.6/ppc386 fpc-1.0.6-1 I ask because my programs are not automatically being compiled with the desired options '-Cr -Co -gl'. I can enable range checking in the source file with {$R+}, is there a similar solution for -gl? -Alan = A Congressman was once asked about his attitude toward whiskey. "If you mean the demon drink that poisons the mind, pollutes the body, desecrates family life, and inflames sinners, then I'm against it. " "But if you mean the elixir of Christmas cheer, the shield against winter chill, the taxable potion that puts needed funds into public coffers to comfort little crippled children, then I'm for it." "This is my position, and I will not compromise." __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]IRCClient / Server with fpc
Hello, is there an example of how to write an IRC Client with FPC, the isock*.pp examples only show how to read until i get a "QUIT". thx. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]Error compiling testdb.pp example (mysql)
On Sat, Jun 14, 2003 at 06:30:09PM +0200, [EMAIL PROTECTED] wrote: > > > On Sun, 15 Jun 2003, James Mills wrote: > > > On Sat, Jun 14, 2003 at 05:01:38PM +0200, [EMAIL PROTECTED] wrote: > > > > > > > > > On Sun, 15 Jun 2003, James Mills wrote: > > > > > > > On Sat, Jun 14, 2003 at 04:08:38PM +0200, [EMAIL PROTECTED] 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... > > Correction: the info which you need :-) > > Seems that you have mysql version 4 installed. > The units we distribute standard work with MySQL 3.23. > > There are units for mysql version 4 as well, but you must compile and > install them separately. Get the sources of the packages , and look in > packages/base/mysql/mysql4 > > I warn against using mysql with FPC. Their API changes quite often in > incompatible ways, which can be masked with C macros but which cannot > be masked with Pascal functions. > > Try and use firebird instead is my usual advice. What about sqlite ? Has anyone gotten that to work in any application they've developed. cheers James > > Michael. > > > ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- - - James Mills Zero Defect Software Engineers Group - ZDSEG ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]/usr/lib/fpc/1.0.6/ppc386 vs. /usr/bin/fpc vs. fpc.cfg?
At 20:06 14-6-2003, you wrote: Are there known issues with 1.0.6 and it's finding the configuration file? Does it matter whether I compile using the 'fpc' or 'ppc386' command (they differ on my system): [EMAIL PROTECTED] ian]$ more ~amead/fpc.cfg -gl -Co -Cr [EMAIL PROTECTED] ian]$ ls -l `which ppc386` lrwxrwxrwx1 root root 25 May 17 08:49 /usr/bin/ppc386 -> /usr/lib/fpc/1.0.6/ppc386* [EMAIL PROTECTED] ian]$ ls -l `which fpc` -rwxr-xr-x1 root root78020 May 23 2002 /usr/bin/fpc* [EMAIL PROTECTED] ian]$ ls -l /usr/lib/fpc/1.0.6/ppc386 -rwxr-xr-x1 root root 897844 May 23 2002 /usr/lib/fpc/1.0.6/ppc386* [EMAIL PROTECTED] ian]$ rpm -qf /usr/bin/fpc fpc-1.0.6-1 [EMAIL PROTECTED] ian]$ rpm -qf /usr/lib/fpc/1.0.6/ppc386 fpc-1.0.6-1 I ask because my programs are not automatically being compiled with the desired options '-Cr -Co -gl'. I can enable range checking in the source file with {$R+}, is there a similar solution for -gl? /usr/bin/fpc is only a wrapper and does not include any knowledge to compile a file. The only task for it is to call the correct compiler based on the -P setting, when not specified it calls the default compiler. This default compiler can be checked by running /usr/bin/fpc -PB The compiler will first try to load ~/.fpc.cfg, when not found it'll look for ~/.ppc386.cfg when not found it looks for /etc/fpc.cfg and finally for /etc/ppc386.cfg Peter ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal