This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kdevelopa configuration to support MySQL base.

Tags: None
(comma "," separated)
jarekuw
Registered Member
Posts
2
Karma
0
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?


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]