Using C connector without mysql_config

You are viewing an old version of this question. View the current version here.

Hi everybody,

I am moving from mysql to MariaDB. With mysql I was linking the C connector to my application with 'mysql_config --libs', and according to what I can read on internet it should still be possible with MariaDB, but on my system mysql_config does not exist and I do not know how to get it and if the copy I will eventually get will be still compatible with MariaDB.

So the question is: how to link MariaDB to my C/C++ application?

Debian 10 (Buster) 64 bits ~ mariadb-server Version: 1:10.3.15-1 ~ mariadb-client Version: 1:10.3.15-1 ~

Thank you in advance

Answer

On my system I had installed only mariadb-server and mariadb-client, so mariadb_config was not present and mysql_config is not used anymore.

I found out that I need to install also libmariadb-dev which pulls in mariadb_config and all the headers and libs necessary to compile and link my application. I found some differences in the APIs relative to mysql, but until now doesn't look bad.

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.