Page 1 of 1

Help: Makefile with SQL lib

Posted: Sun Mar 05, 2006 4:30 pm
by Fussi
Hi.

I've created my own small module (kinda SQLAuth, but with FAR less functions). But now i got the problem that i have to add the mysql includes and the libmysqlclient to the makefile.

Any idea how to do that? My tries are always failing.. Either he cant find mysql.h or he messes completely up :oops:

Posted: Wed Apr 05, 2006 6:59 pm
by Mephisto
Hi,

I had to add MySQL support to IRCServices, which wasn't really easy too. I needed some days to figure out what I have to change.

I'd say you have to change the line

IRCDLIBS=-lcrypt -lnsl -ldl -L/home/xxx/Unreal3.2/extras/regexp/lib -ltre -L../extras/c-ares/lib -lcares

to something like that

IRCDLIBS=-lcrypt -lnsl -ldl -L/home/xxx/Unreal3.2/extras/regexp/lib -ltre -L../extras/c-ares/lib -lcares -L/usr/lib/mysql -lmysql


If GCC can't find mysql.h you have to change the line

XCFLAGS=-I/home/xxx/Unreal3.2/extras/regexp/include -I/home/xxx/Unreal3.2/extras/c-ares/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic

to

XCFLAGS=-I/home/xxx/Unreal3.2/extras/regexp/include -I/usr/include/mysql -I/home/xxx/Unreal3.2/extras/c-ares/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic

Of course these are only examples, and path could differ depending on your linux distribution.

Hope this helped you a little. If there are still questions just ask :)
(btw.: Sorry for my english, I'm not a native speaker)

Greets, Mephisto

Posted: Fri Apr 07, 2006 7:45 pm
by Fussi
Thanks for the tip, will try that!

Posted: Sun Apr 09, 2006 8:54 pm
by Fussi
For anyone who tries to write mysql enabled modules: The changes to the makefile above are WORKING. Thanks to Mephisto :)