This example didn't gave any errors with that MySQL connector 6.1.11
#include <stdio.h>
//#include <mysql.h>
#include "mysql.h" // only for the depedencies for the zip
#pragma comment(lib, "libmysql.lib")
//#pragma comment(lib, "libmariadb.lib")
int _cdecl main(int argc, char *argv[])
{
printf("Testing testing testing\n");
printf("MySQL client version: %s\n", mysql_get_client_info());
// printf("MariaDB client version: %s\n", mysql_get_client_info());
return 0;
}
MariaDB have bugs in headers, varargs are not handled correctly.Building TestMariaDB.obj.
C:\code\PellesC\MariaDB\include\mysql.h(444): warning #2203: Function 'mysql_load_plugin' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(495): warning #2203: Function 'mariadb_get_infov' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(572): warning #2203: Function 'mysql_optionsv' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(573): warning #2203: Function 'mysql_get_optionv' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(728): warning #2203: Function 'mariadb_get_infov' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(782): warning #2203: Function 'mysql_optionsv' can't be __stdcall, changed to __cdecl.
C:\code\PellesC\MariaDB\include\mysql.h(783): warning #2203: Function 'mysql_get_optionv' can't be __stdcall, changed to __cdecl.
Building TestMariaDB.exe.
Done.
Build time: 750ms