I am trying to write programs in Visual Studio for MySQL but for some reason I cannot get Visual Studio to use the connector files for MySQL , the code I have is:
#include <my_global.h>
#include <mysql.h>
#include "stdafx.h"
int main(int argc, char **argv)
{
printf("MySQL client version: %s\n", mysql_get_client_info());
return 0;
}
The errors I am getting are:
Error C3861 'mysql_get_client_info': identifier not found ConsoleApplication6 c:\documents\visual studio 2017\projects\consoleapplication6\consoleapplication6\consoleapplication6.cpp 7
Error (active) E0020 identifier "mysql_get_client_info" is undefined ConsoleApplication6 c:\Documents\Visual Studio 2017\Projects\ConsoleApplication6\ConsoleApplication6\ConsoleApplication6.cpp 7
Error (active) E1696 cannot open source file "my_global.h" ConsoleApplication6 c:\Documents\Visual Studio 2017\Projects\ConsoleApplication6\ConsoleApplication6\ConsoleApplication6.cpp 1
Error (active) E1696 cannot open source file "mysql.h" ConsoleApplication6 c:\Documents\Visual Studio 2017\Projects\ConsoleApplication6\ConsoleApplication6\ConsoleApplication6.cpp 2
I believe that I am linking the proper include and library files which I got from here: https://dev.mysql.com/downloads/connector/c/
I have followed the instructions on how to connect the header and library files correctly but it is still not working, any help would be greatly appreciated.