You have a typo (t missing)
mysqlpp::Connecion conn(true);
should be
mysqlpp::Connection conn(true);
^
^
You may have other errors when you correct this but this is the cause of your compilation errors. If you read the compilation error message very carefully you can see that it actually echos back the mistyped class name Connecion
.
In light of your rewriting the question, I believe the function you want is called
conn.connect(db, server, user, pass)
This certainly works for me when I use mysql++. You can also use
conn.connected();
to see if your connection is OK;
Also
mysqlpp::Query query = conn.query("SHOW TABLES");
instead of
mysqlpp::Query query = conn.query('SHOW TABLES');
Or you can use the <<
operator
Query query = conn.query();
query << "SHOW TABLES";