When linking with the C API you can get the following errors on some systems:
gcc -g -o client test.o -L/usr/local/lib/mysql -lmysqlclient -lsocket -lnsl Undefined first referenced symbol in file floor /usr/local/lib/mysql/libmysqlclient.a(password.o) ld: fatal: Symbol referencing errors. No output written to client
This means that on your system you have to include the math library (-lm) last in the compile/link line.
Go to the first, previous, next, last section, table of contents.