Help: Makefile with SQL lib

These are old archives. They are kept for historic purposes only.
Post Reply
Fussi
Posts: 33
Joined: Fri Sep 24, 2004 9:46 pm
Location: At Home
Contact:

Help: Makefile with SQL lib

Post 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:
Mephisto
Posts: 5
Joined: Wed Apr 05, 2006 4:45 pm

Post 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
Fussi
Posts: 33
Joined: Fri Sep 24, 2004 9:46 pm
Location: At Home
Contact:

Post by Fussi »

Thanks for the tip, will try that!
Fussi
Posts: 33
Joined: Fri Sep 24, 2004 9:46 pm
Location: At Home
Contact:

Post by Fussi »

For anyone who tries to write mysql enabled modules: The changes to the makefile above are WORKING. Thanks to Mephisto :)
Post Reply