List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 18 1999 3:21am
Subject:Re: Linking Client Library
View as plain text  
At 9:55 PM -0500 7/17/99, Joshua T. McKee wrote:
>I've been trying to compile a C program with the mySQL client library
>(libmysqlclient.a), but keep receiving the following error:
>Undefined                       first referenced
> symbol                             in file
>mysql_real_connect                  /var/tmp/cc0YEHaB1.o
>ld: fatal: Symbol referencing errors. No output written to db
>I am compiling with the following:
>gcc -o db -L/usr/local/lib/mysql -I/usr/local/include/mysql -lmysqlclient
>-lsocket -lnsl -lm db.c
>I'm using Solaris 2.6 with gcc 2.8.1
>The libraries/header files are installed in the respective locations. Can
>anyone give me an idea what's wrong?

What version of MySQL are you using?  If it's too old, it won't
have mysql_real_connect().

Paul DuBois, paul@stripped
Linking Client LibraryJoshua T. McKee18 Jul
  • Re: Linking Client LibraryPaul DuBois18 Jul
    • Re: Linking Client LibraryJoshua T. McKee18 Jul
      • Re: Linking Client LibrarySasha Pachev18 Jul
        • Re: Linking Client LibraryPaul DuBois18 Jul
  • Linking Client LibraryMichael Widenius31 Jul