i just include
#include "include/mysql.h"
and try to connect my mysql db
MYSQL_RES *result;
MYSQL_ROW row;
MYSQL *connection, mysql;
int state;
mysql_init(&mysql);
connection = mysql_real_connect(&mysql,"localhost","root","pass","WorkerProject",0,0,0);
i included the files into my project. I use eclipse and linked the mysql bin, include and lib files from the preporties of project. However, i get error in these two lines:
mysql_init(&mysql);
connection = mysql_real_connect(&mysql,"localhost","root","pass","WorkerProject",0,0,0);
Undefined reference error. Why?
error:
/home/mert/workspace1/Project484/Debug/../src/main.cpp:99: undefined reference to `mysql_init'
/home/mert/workspace1/Project484/Debug/../src/main.cpp:100: undefined reference to `mysql_real_connect'