Registered Member
|
Hello
I work on Ubuntu. I downloaded MySQl library((http://dev.mysql.com/downloads/connector/c/) When I put this code: #include <iostream> #include <mysql.h> int main(int argc, const char * argv[]) { MYSQL mysql; mysql_init(&mysql); if(mysql_real_connect(&mysql, "127.0.0.1", "root", "", "mysql", 0, NULL, 0)) std::printf("Connection OK \n"); else std::printf("Connection fail : %d, %s\n", mysql_errno(&mysql), mysql_error(&mysql)); mysql_close(&mysql); return 0; } Compiler return error : fatal error : mysql.h : No such file or directory. How to add MySQl library to Kdevelopa? |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]