Connection

J

johnliew

Guest
Hi all,

I am newbie in linux. Currently i am having a problem in connecting mysql and c++ in linux. When i try to run my script in terminal i have a problem as below,

test.cpp:3:19: fatal error: mysql.h: No such file or directory
compilation terminated.
To overcome this problem, i tried to install the 'mysql-connector-cpp' package. However, i do have another problem which is,
'mysql-connector-cpp' not found in package names. Trying capabilities.
No provider of 'mysql-connector-cpp' found.
So is there anyway to overcome this problem or anyway to get the "mysql.h' ?Anyone can assist me about this?
Best Regards.
 


On Debian-based systems I think you'll have to install the library libmysqlcppconn5:
Code:
$ sudo apt-get update
$ sudo apt-get install libmysqlcppconn5
You can find this by using apt-cache search:
Code:
$ apt-cache search mysql | grep cpp
 

Members online


Top