C++ mysql error - undefined reference -


i include

#include "include/mysql.h" 

and try connect 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 files project. use eclipse , linked mysql bin, include , lib files preporties of project. however, error in these 2 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 `mysql_init' /home/mert/workspace1/project484/debug/../src/main.cpp:100: undefined reference `mysql_real_connect' 


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -