Compile & Link error
Gene Holmerud
plug-discuss@lists.plug.phoenix.az.us
Fri, 22 Mar 2002 17:02:10 -0700
I'm trying to compile & link an example for mysql access from C code
using the command:
gcc -L/usr/local/mysql/lib -I/usr/local/mysql/include -o select \
select.c -lmysql -lnsl -lsocket
I get error messages:
select.c: In function `main':
select.c:5: warning: return type of `main' is not `int' <-OK
/usr/bin/ld: cannot find -lmysql
collect2: ld returned 1 exit status
I looked in /usr/local/mysql/lib and saw *.a's, so figured I was OK
that way. If I omit the -lmysql in the command, it doesn't object to
the -lnsl, but fails on -lsocket. What am I missing?
Appreciations,
Gene