What does this mean?

Muthukumar Ratty muthu@iqmail.net
Tue Jun 24 20:54:00 GMT 2003


> $ make
> gcc  -Wall -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient
> ocd-reader.c
> /tmp/ccHxUIAV.o(.text+0xf6): In function `main':
> : undefined reference to `mysql_init'

Assuming mysql_init is defined in libmysqlclient... gcc is not finding the
library.


> /tmp/ccHxUIAV.o(.text+0x122): In function `main':
> : undefined reference to `mysql_real_connect'
> /tmp/ccHxUIAV.o(.text+0x13b): In function `main':
> : undefined reference to `mysql_error'
> /tmp/ccHxUIAV.o(.text+0x1b03): In function `main':
> : undefined reference to `mysql_real_query'
> /tmp/ccHxUIAV.o(.text+0x1b49): In function `main':
> : undefined reference to `mysql_close'
> collect2: ld returned 1 exit status
> make: *** [ocd-reader] Error 1
>
> My program compiles ok on another machine (Solaris) but on Linux I get the
> above error messages. Any ideas appreciated.
>
> Dave
>




More information about the Gcc-help mailing list