Saturday, December 20, 2008

MySQL C API in Anjuta IDE

I thought it'd be helpful if I posted a tutorial on how to configure Anjuta to compile using the MySQL API for those who want to write applications to take advantage of this free powerful open source database. After hours of messing around in Anjuta, I finally figured it out and I'll explain as much as I know so you have a understanding.

All you have to do is pretty simple, goto the Project menu then click on Project Properties then goto the Variables tab and add the following:
LIBS=`mysql_config --libs`
CFLAGS=`mysql_config --cflags`
As seen in the picture below.


How it works?
Your configure file now know what to do for --libs and --cflags, when the user runs configure it'll generate makefiles. Which you can then use to build the executable.

No comments:

Post a Comment