>>>>> "G" == GTP <Naveen> writes:
G> test.cgi: test.o
G> gcc test.o -o test.cgi -lmysqlclient -L$(MYSQLLIBDIR) -lm
G> problem is when I try to run test.cgi, it says:
G> ld.so failed: Can't find shared library "libmysqlclient.so.4.0"
G> but this file is in /usr/local/lib/mysql - I can see it there.
Options to the C compiler are processed left to right. Think about
that and then carefully try to interpret what you told the compiler.
Hint: you can't ask the compiler to look for something first, then
tell the it where to find that thing.
Also, if you're using a shared library that is not in a system-defined
location, you need to tell the program where to look for the library
at run-time using the appropriate compiler flags for your system.
v.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@stripped Rockville, MD +1-301-545-6996
PGP & MIME spoken here http://www.kciLink.com/home/khera/