conditions:
MySQL-3.23.32 
FreeBSD 4.2-RELEASE

problem:
==========================================================
MySQL documentation:
16.1  Adding a New User-definable Function
[...]
 The MySQL source
distribution includes a file `sql/udf_example.cc' that defines 5 new
functions.  Consult this file to see how UDF calling conventions work. 
[...]
==========================================================
sql/udf_example.cc:
** A dynamicly loadable file should be compiled sharable
** (something like: gcc -shared -o udf_example.so myfunc.cc).
** You can easily get all switches right by doing:
** cd sql ; make udf_example.o
** Take the compile line that make writes, remove the '-c' near the end of
** the line and add -o udf_example.so to the end of the compile line.
** The resulting library (udf_example.so) should be copied to some dir
** searched by ld. (/usr/lib ?)
==========================================================
bash-2.04$  make udf_example.o
c++ -DMYSQL_SERVER                      
-DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-3.23.32\""   
-DDATADIR="\"/db/mysql\""                        
-DSHAREDIR="\"/usr/local/mysql-3.23.32/share/mysql\""      
-DHAVE_CONFIG_H -I./../include                   -I./../regex                    -I. 
-I../include -I.. -I.    -O3 -DDBUG_OFF
   -fno-implicit-templates -DMYSQLD_NET_RETRY_COUNT=1000000 -c udf_example.cc
==========================================================
bash-2.04$ c++ -DMYSQL_SERVER   -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql-3.23.32\""  
-DDATADIR="\"/db/mysql\""
  -DSHAREDIR="\"/usr/local/mysql-3.23.32/share/mysql\"" -DHAVE_CONFIG_H -I./../include 
 -I./../regex -I. -I../
include -I.. -I.  -O3 -DDBUG_OFF -fno-implicit-templates 
-DMYSQLD_NET_RETRY_COUNT=1000000 udf_example.cc  -o udf_example.so
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x79): undefined reference to `main'
/tmp/ccH74112.o: In function `metaphon':
/tmp/ccH74112.o(.text+0x4a): undefined reference to `default_charset_info'
==========================================================

Can somebody tell me where source of the problem can be?

-----------------------------
Mike Andreev 
Programer
SMIS Lab, Space Research Institute (Moscow, Russia). http://smis.iki.rssi.ru
[EMAIL PROTECTED]
-----------------------------



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to