PDA

View Full Version : Compiling mysql client



smj
September 22nd, 2007, 05:25 PM
Hi,
I've just installed ubuntu 7.04-server.
I have done apt-get install build-essential.
Now I am trying to compile a simple mysql client written in c.
I know I need to use some compiler flag to tell it where the mysql libraries are but I can't find them.
Any help?

Thanks

smj
September 23rd, 2007, 04:27 AM
I've figured it out. For people having the same problem:

apt-get install mysql-client (Not sure if this one is actually needed)
apt-get install libmysqlclient15-dev

then when compiling i use
gcc -I/usr/include/mysql/ -L/usr/lib/mysql/ -lmysqlclient