Article about the mariadb-connector-c package
Connector releases
mariadb-connector-c 3.0 - until Fedora 28 ( also available in F29 & F30 base )
mariadb-connector-c 3.1 - until Fedora 35
mariadb-connector-c 3.2 - until Fedora 36
mariadb-connector-c 3.3 - current ( F36 - F41 )
mariadb-connector-c 3.4 - current ( F42 - Rawhide )
At the upstream, the connector-c is developed as a git submodule of mariadb server.
That means every new release of mariadb has the latest connector c code inside.
Developement of 3rd software
All packages that required mysql-devel, mariadb-devel or community-mysql-devel should now require mariadb-connector-c-devel instead.
(#1486480 and proposal)
Only software that needs to develop against the server (for example building custom server plugins or application with embedded database) should use mariadb-devel.
By this approach, client and server parts were successfuly divided.
Usage examples
I would recommend this website, often referenced on the internet, as a good example and tutorial for writing C code with this connector.
http://zetcode.com/db/mysqlc/
It is originally written for mysql connector c, but they are more or less compatible.
You can also try following code:
#include <stdio.h> #include <mysql.h> void main() { printf("MySQL client version: %s\n", mysql_get_client_info()); return; }
Compiled with:
gcc mariadb_code.c -o mariadb_program `mariadb_config --cflags --libs`
The invocation of mariadb_config --cflags will set the correct path to search header files in.
Notes
Upstream information
Upstream release notes
API reference