Forum > Databases
fpc won't compile testdb mysql program
thaimann:
I get the following error when I try to compile testdb3.pp program:
/usr/bin/ld: cannot find -lmysqlclient
After reading the Lazaruth Database Tutorial, I did the following
as root in /usr/lib
ln -s libmysqlclient.so.10.0.0 lmysqlclient
ln -s libmysqlclient.so.10.0.0 mysqlclient
I did the same in the local fpc directry also (where I have the source code, which is also where I compile it from.)
I also had added "-F12/lib;/usr/lib to /etc/fpc.cfg
Marc:
rename your symlink to libmysqlclient.so
Anonymous:
I did this in both /usr/lib and my local dir and am still getting the same error.
Is there a way to check to see what dir it is looking for the file in? The web page author said he put the s.l. in multiple dir, but he didn't say which ones.
Terry
Marc:
usually /usr/lib only is ok. AFAIK, ld looks there
Look in the link.res file, there are the (extra ?) searchpaths defined.
silly question maybe, but does libmysqlclient.so.10.0.0 exits ?
Anonymous:
[terry@pegasus fpc]$ ls -l /usr/lib/mysql/libmysqlclient.so.10.0.0
-rwxr-xr-x 1 root root 214580 Oct 27 2003 /usr/lib/mysql/libmysqlclient.so.10.0.0
[terry@pegasus fpc]$
[root@pegasus bin]# cd /usr/lib
[root@pegasus lib]# ls -l | grep mysqlc
lrwxrwxrwx 1 root root 24 Apr 19 07:14 libmysqlclient.so -> libmysqlclient.so.10.0.0
lrwxrwxrwx 1 root 777 24 Apr 18 22:09 lmysqlclient -> libmysqlclient.so.10.0.0
lrwxrwxrwx 1 root 777 24 Apr 18 22:03 mysqlclient -> libmysqlclient.so.10.0.0
I've tried to add a lin k to the logical dir in the link file, but no resolution yet.
Here is the listing:
[terry@pegasus fpc]$ cat link.res SEARCH_DIR(/lib/)
SEARCH_DIR(/usr/lib/)
SEARCH_DIR(/usr/X11R6/lib/)
SEARCH_DIR(/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/rtl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/zvt/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/zlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/x11/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/utmp/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/unzip/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/unixutil/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/tcl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/syslog/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/svgalib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/sqlite/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/regexpr/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/pthreads/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/postgres/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/paszlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/pasjpeg/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/oracle/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/opengl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/odbc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/newt/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/netdb/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ncurses/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/mysql/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/md5/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libpng/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libgd/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/libasync/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/lexyacc/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/imlib/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ibase/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gtk2/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gtk/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gnome/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/ggi/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gdbm/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gdbint/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/gconf/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fv/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fpgtk/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/forms/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/fcl/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/cdrom/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/bfd/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/units/i386-linux/)
SEARCH_DIR(/usr/lib/fpc/1.9.8/)
INPUT(
/usr/lib/fpc/1.9.8/units/i386-linux/rtl/cprt21.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/crtbegin.o
/usr/lib/crti.o
testdb3.o
/usr/lib/fpc/1.9.8/units/i386-linux/rtl/system.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3_com.o
/usr/lib/fpc/1.9.8/units/i386-linux/mysql/mysql3_version.o
)
INPUT(
-lm
-lmysqlclient
-lc
)
INPUT(
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/crtend.o
/usr/lib/crtn.o
)
[terry@pegasus fpc]$
Navigation
[0] Message Index
[#] Next page