Witam,
próbuję połączyć się z bazą danych w VC i mam pewien problem zainstalowałem connectora według tej strony
http://dev.mysql.com/doc/refman/5.5/en/connector-cpp-apps-windows-visual-studio.html#connector-cpp-application-build-dynamic
wyskoczył mi komunikat że nie ma bootsa jakiegoś to też to zainstalowałem następnie zgłosiło błąd że nie ma sqlstring.h dowiedizałem się ze instalator connectora nie zawiera tego i trzeba samemu dodać. dodałem i wyskakuje komunikat który mnei już troszeczkę rozwalił
tutaj kod którym chcę żeby się skompilowało
#include "stdafx.h"
#include <iostream>
#include <boost\variant.hpp>
#include "mysql_connection.h"
#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/resultset.h>
#include <cppconn/statement.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
a tutaj błąd
1>------ Rebuild All started: Project: bazydanych, Configuration: Release Win32 ------
1> stdafx.cpp
1> bazydanych.cpp
1>c:\mysql\include\cppconn\sqlstring.h(36): warning C4251: 'sql::SQLString::realStr' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'sql::SQLString'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1>C:\mysql\include\mysql_connection.h(156): warning C4251: 'sql::mysql::MySQL_Connection::proxy' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'sql::mysql::MySQL_Connection'
1> with
1> [
1> T=sql::mysql::NativeAPI::NativeConnectionWrapper
1> ]
1>C:\mysql\include\cppconn/exception.h(59): warning C4251: 'sql::SQLException::sql_state' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'sql::SQLException'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1>c:\mysql\include\cppconn\config.h(60): error C2371: 'int8_t' : redefinition; different basic types
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdint.h(17) : see declaration of 'int8_t'
1>c:\mysql\include\cppconn\config.h(60): error C2371: 'int8_t' : redefinition; different basic types
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\stdint.h(17) : see declaration of 'int8_t'
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========