I'm new to mysql so I'm just creating a very small C++ program to try and connect to my server and run a simple query.
I'm using MySql 5.1.33-community via TCP/IP
My program is pretty small:
#include "mysql_connection.h"
#include "mysql_driver.h"
#include "cppconn\resultset.h"
using namespace sql;
int main( int argn, char* argv[] )
{
mysql::MySQL_Driver* sqlDriver;
Connection* conn;
Statement* qryUser;
sql::ResultSet* rsUser;
sqlDriver = mysql::get_mysql_driver_instance();
conn = sqlDriver->connect("tcp://127.0.0.1:3306", "ID", "pw");
delete conn;
return 0;
}
Everything compiled fine until I added the include to #include "cppconn\resultset.h". After that when I compile I get the error:
Error 1 error C2371: 'int8_t' : redefinition; different basic types c:\program files\mysql\mysql connector c++ 1.0.4.0\include\cppconn\config.h 48
Any ideas?