>>>>> "Joshua" == Joshua T McKee <jtmckee@stripped> writes:
Joshua> I've been trying to compile a C program with the mySQL client library
Joshua> (libmysqlclient.a), but keep receiving the following error:
Joshua> Undefined first referenced
Joshua> symbol in file
Joshua> mysql_real_connect /var/tmp/cc0YEHaB1.o
Joshua> ld: fatal: Symbol referencing errors. No output written to db
Joshua> I am compiling with the following:
Joshua> gcc -o db -L/usr/local/lib/mysql -I/usr/local/include/mysql -lmysqlclient
Joshua> -lsocket -lnsl -lm db.c
Joshua> I'm using Solaris 2.6 with gcc 2.8.1
Joshua> The libraries/header files are installed in the respective locations. Can
Joshua> anyone give me an idea what's wrong?
Move the db.c before the libraries in the link line and it should work!