Компиляция происходит нормально, но вот линковка - нет.
Пробовал это же делать на Linux и Windows - без проблем все получалось.
Кто-нибудь сталкивался с такой проблемой? И как удалось решить?
Может я какие-нибудь ключи для компилятора не указал?
- Код: Выделить всё
Dodge:/usr/local/share/examples/fpc-2.0.2/mysql 1$ fpc -Fl/usr/lib/mysql testdb4.pp
Free Pascal Compiler version 2.0.2 [2005/11/15] for powerpc
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Darwin for PowerPC
Compiling testdb4.pp
testdb4.pp(11,3) Note: Local variable "count" not used
testdb4.pp(11,9) Note: Local variable "num" not used
testdb4.pp(12,3) Note: Local variable "code" not used
testdb4.pp(15,3) Note: Local variable "qbuf" not used
Assembling qtest
Linking testdb4
/usr/bin/ld: Undefined symbols:
_mysql_close
_mysql_error
_mysql_fetch_row
_mysql_free_result
_mysql_get_client_info
_mysql_get_host_info
_mysql_init
_mysql_num_fields
_mysql_num_rows
_mysql_port
_mysql_query
_mysql_real_connect
_mysql_select_db
_mysql_stat
_mysql_store_result
_mysql_unix_port
_mysql_refresh
testdb4.pp(85,1) Error: Error while linking
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)
Содержимое каталога /usr/lib/mysql:
- Код: Выделить всё
Dodge:/usr/local/share/examples/fpc-2.0.2/mysql 1$ ls -l /usr/lib/mysql/
total 9624
-rw-r--r-- 1 root wheel 20384 Aug 22 2005 libdbug.a
-rw-r--r-- 1 root wheel 53576 Aug 22 2005 libheap.a
-rw-r--r-- 1 root wheel 17064 Aug 22 2005 libmerge.a
-rw-r--r-- 1 root wheel 404656 Aug 22 2005 libmyisam.a
-rw-r--r-- 1 root wheel 31672 Aug 22 2005 libmyisammrg.a
-rw-r--r-- 1 root wheel 1404792 Aug 22 2005 libmysqlclient.a
-rwxr-xr-x 1 root wheel 768 Aug 22 2005 libmysqlclient.la
-rw-r--r-- 1 root wheel 1419032 Aug 22 2005 libmysqlclient_r.a
-rwxr-xr-x 1 root wheel 774 Aug 22 2005 libmysqlclient_r.la
-rw-r--r-- 1 root wheel 1077544 Aug 22 2005 libmystrings.a
-rw-r--r-- 1 root wheel 330296 Aug 22 2005 libmysys.a
-rw-r--r-- 1 root wheel 131232 Aug 22 2005 libnisam.a
-rw-r--r-- 1 root wheel 6512 Aug 22 2005 libvio.a
Информация о MySQL сервере:
- Код: Выделить всё
mysql> status
--------------
mysql Ver 14.7 Distrib 4.1.13a, for apple-darwin8.0 (powerpc) using EditLine wrapper
Connection id: 2
Current database: test
Current user: 1@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 4.1.13a
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/mysql/mysql.sock
Uptime: 5 hours 21 min 4 sec
Threads: 1 Questions: 11 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 1 Queries per second avg: 0.001
--------------