I am using ubuntu to build a project that uses mysql. To compile the project from the command line I use the following flags:
$(mysql_config --cflags)$(mysql_config --libs)
However, when I am trying to build from Qt, I get that undefined reference to mysql_close and the rest of mysql connection functions.
I tried adding the representation of the previous command line flags to QMAKe in Qt and still same errors.
Any Help?
Add the output of “mysql_config –cflags” to the compiler flags with:
Likewise for LIBS:
All of the above goes into your project file (*.pro) of course.