How to connect C++ program to MariaDB

Went through the Connector/C installation and documentation. Ironically the one thing that's missing is HOW to connect a C++ program to MariaDB. No clue.

Running mysql_affected_rows.c (in the examples folder), I get: "fatal error: mysql.h: No such file or directory". Paths weren't set up during installation, and again, there's no clue how to do it!

After searching, I find mysql.h in /usr/include/mysql. I can only assume there will be a similar problem when linking.

My question is: How are the paths set up to compile, link, and connect to MariaDB? Also what libraries need to be linked?

Thanks, Alan

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.