Witam,
Czy znajcie się osoba która byłaby wstanie napisać prosty kod programu C++ (console application) który robiłby cokolwiek w bazie Mysql przez Connector/C++ 1.1 w Visual C++ Studio 2010? Potrzebuje prostego przykładu bo mi nerwy puszczają, bawię się w to już kilka dni i mam tylko same problemy, udało mi się zainstalować wszystkie potrzebne dodatki. Mój problem polega na tym że nigdzie w sieci nie mogę znaleźć prostego przykładu który zadziałałby mi z Connector/C++ 1.1
Zlituje się ktoś nade mną?
już to miałem, nie rozumiem co to w ogóle robi?
Moje pytania:
- Jak się zalogować?
- jak wysłać komendę?
Dodam że bawiłem się już wcześniej mysql w C# gdzie w sieci znalazłem dobre przykłady i po kilkunastu minutach stworzyłem działający program. A jak już pisałem wcześniej w języku C++ ciężko cokolwiek znaleźć pod Connector/C++ 1.1, oprócz oficjalnej strony MySQL z której za cholerę nic nie mogę zrozumieć.
Przecież na stronie MySQL-a masz proste przykłady. Tu odnośnie Twoich pytań ---> http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-examples-query.html
ok, znalazłem gotowy kod na tej stronie, tylko go wklejam i chcę go na razie tylko zbudować
/* Standard C++ includes */
#include <stdlib.h>
#include <iostream>
/*
Include directly the different
headers from cppconn/ and mysql_driver.h + mysql_util.h
(and mysql_connection.h). This will reduce your build time!
*/
#include "mysql_connection.h"
#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/resultset.h>
#include <cppconn/statement.h>
using namespace std;
int main(void)
{
cout << endl;
cout << "Running 'SELECT 'Hello World!' »
AS _message'..." << endl;
try {
sql::Driver *driver;
sql::Connection *con;
sql::Statement *stmt;
sql::ResultSet *res;
/* Create a connection */
driver = get_driver_instance();
con = driver->connect("tcp://127.0.0.1:3306", "root", "root");
/* Connect to the MySQL test database */
con->setSchema("test");
stmt = con->createStatement();
res = stmt->executeQuery("SELECT 'Hello World!' AS _message");
while (res->next()) {
cout << "\t... MySQL replies: ";
/* Access column data by alias or column name */
cout << res->getString("_message") << endl;
cout << "\t... MySQL says it again: ";
/* Access column fata by numeric offset, 1 is the first column */
cout << res->getString(1) << endl;
}
delete res;
delete stmt;
delete con;
} catch (sql::SQLException &e) {
cout << "# ERR: SQLException in " << __FILE__;
cout << "(" << __FUNCTION__ << ") on line " »
<< __LINE__ << endl;
cout << "# ERR: " << e.what();
cout << " (MySQL error code: " << e.getErrorCode();
cout << ", SQLState: " << e.getSQLState() << " )" << endl;
}
cout << endl;
return EXIT_SUCCESS;
}
O to błędy:
1>e:\mypro\mysql\mysql\mysql.cpp(21): error C2001: newline in constant
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2146: syntax error : missing ';' before identifier 'AS'
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2001: newline in constant
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2015: too many characters in constant
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2065: 'AS' : undeclared identifier
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2146: syntax error : missing ';' before identifier '_message'
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2065: '_message' : undeclared identifier
1>e:\mypro\mysql\mysql\mysql.cpp(22): error C2143: syntax error : missing ';' before 'constant'
1>e:\mypro\mysql\mysql\mysql.cpp(24): error C2143: syntax error : missing ';' before 'try'
1>e:\mypro\mysql\mysql\mysql.cpp(53): error C2146: syntax error : missing ';' before identifier '»'
1>e:\mypro\mysql\mysql\mysql.cpp(53): error C2065: '»' : undeclared identifier
1>
1>Build FAILED.
error C2001: newline in constant
:
cout << "Running 'SELECT 'Hello World!' »
AS _message'..." << endl;
Nie możesz w ten sposób przenosić do nowej linii części literałów tekstowych.
Zrób tak:
cout << "Running 'SELECT 'Hello World!' AS _message'..." << endl;
albo:
cout << "Running 'SELECT 'Hello World!' \
AS _message'..." << endl;
lub:
cout << "Running 'SELECT 'Hello World!'"
"AS _message'..." << endl;
Zrobione, kolejny błąd jest w
cout << "(" << __FUNCTION__ << ") on line " »
<< __LINE__ << endl;
1>e:\mypro\mysql\mysql\mysql.cpp(52): error C2146: syntax error : missing ';' before identifier '»'
1>e:\mypro\mysql\mysql\mysql.cpp(52): error C2065: '»' : undeclared identifier
Usuń znaczek »
, bo on został wstawiony przy kopiowaniu ze strony.
Żartujesz? Przecież wyraźnie jest napisane w komunikatach błędu, że kompilator nie wie co to '»' na końcu 52 linii. Skopiował Ci się tam jakiś dziwny znaczek ze strony. Weź go po prostu usuń i na przyszłość trochę samodzielności.
staram się sam rozwiązywać problemy i to co napisaliście już zrobiłem wcześniej, tylko nie byłem pewny czy jednak na pewno dobrz, bo teraz wyskakuję ładny syf...
Podobnie jest z innymi schematami na stronie MySQL, piszę do was bo nie mogę wyjść z tej "karuzeli" błędów w C++ i MySQL
Błędy: (większość kodu uciąłem)
1>------ Build started: Project: mysql, Configuration: Debug Win32 ------
1>Build started 2012-05-05 10:26:42.
1>InitializeBuildStatus:
1> Touching "Debug\mysql.unsuccessfulbuild".
1>ClCompile:
1> mysql.cpp
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>mysqlcppconn-static.lib(mysql_native_statement_wrapper.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_resultset_metadata.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_art_rset_metadata.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_ps_resultset.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: __thiscall sql::MethodNotImplementedException::MethodNotImplementedException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0MethodNotImplementedException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>mysqlcppconn-static.lib(mysql_parameter_metadata.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_ps_resultset_metadata.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_art_resultset.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_native_connection_wrapper.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_util.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ
(public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_resultset.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_resultbind.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_debug.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ
(public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_prepared_statement.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_metadata.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_client_api.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_driver.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ
(public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ)
1>mysqlcppconn-static.lib(mysql_connection.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_statement.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_warning.obj) : warning LNK4049: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported
1>mysqlcppconn-static.lib(mysql_native_statement_wrapper.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_resultset_metadata.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_art_rset_metadata.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_ps_resultset.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_parameter_metadata.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_ps_resultset_metadata.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: __thiscall
std::basic_ostream<char,struct std::char_traits<char> >::sentry::~sentry(void)" (??1sentry@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@XZ)
1>mysqlcppconn-static.lib(mysql_art_resultset.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_native_connection_wrapper.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_util.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z
(public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_resultset.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_resultbind.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_debug.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: void __cdecl
sql::mysql::MySQL_DebugLogger::log_va(char const * const,char const * const,...)" (?log_va@MySQL_DebugLogger@mysql@sql@@QAAXQBD0ZZ)
1>mysqlcppconn-static.lib(mysql_prepared_statement.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_metadata.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_client_api.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: virtual unsigned __int64
__thiscall sql::mysql::NativeAPI::LibmysqlStaticProxy::stmt_affected_rows(struct st_mysql_stmt *)" (?stmt_affected_rows@LibmysqlStaticProxy@NativeAPI@mysql@sql@@UAE_KPAUst_mysql_stmt@@@Z)
1>mysqlcppconn-static.lib(mysql_driver.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function "public: __thiscall sql::SQLString::SQLString(char const * const)" (??0SQLString@sql@@QAE@QBD@Z)
1>mysqlcppconn-static.lib(mysql_connection.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_statement.obj) : warning LNK4217: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported in function __ehhandler$??0InvalidArgumentException@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
1>mysqlcppconn-static.lib(mysql_warning.obj) : warning LNK4049: locally defined symbol ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)) imported
1>mysqlcppconn-static.lib(mysql_connection.obj) : warning LNK4217: locally defined symbol ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ (public: char const * __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::c_str(void)const ) imported in function "protected: void __thiscall sql::mysql::MySQL_Connection::init(class
std::map<class sql::SQLString,class boost::variant<int,double,bool,class sql::SQLString,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_>,struct std::less<class sql::SQLString>,class std::allocator<struct std::pair<class sql::SQLString const
,class boost::variant<int,double,bool,class sql::SQLString,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct
boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_,struct boost::detail::variant::void_>
> > > &)" (?init@MySQL_Connection@mysql@sql@@IAEXAAV?$map@VSQLString@sql@@V?$variant@HN_NVSQLString@sql@@Uvoid_@0detail@boost@@U3045@U3045@U3045@U3045@
U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@@boost@@U?$less@VSQLString@sql@@@std@@V?$allocator@U?$pair@$$CBVSQLStri
ng@sql@@V?$variant@HN_NVSQLString@sql@@Uvoid_@0detail@boost@@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3045@U3
045@U3045@U3045@@boost@@@std@@@6@@std@@@Z)
1>mysqlcppconn-static.lib(mysql_metadata.obj) : warning LNK4049: locally defined symbol
?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB (public: static unsigned int const std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::npos) imported
1>mysqlcppconn-static.lib(mysql_resultset_metadata.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_art_rset_metadata.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_ps_resultset.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_parameter_metadata.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_ps_resultset_metadata.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
(__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_art_resultset.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_native_connection_wrapper.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
(__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_util.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_resultset.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_resultbind.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_debug.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_prepared_statement.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_metadata.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_client_api.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_driver.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>mysqlcppconn-static.lib(mysql_connection.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_statement.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)
1>mysqlcppconn-static.lib(mysql_warning.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct
$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z)
Dodaj #include <string>
Możesz jeszcze opcjach projektu>linker>input ustaw Ignore All Default Libraries - ale tu nie wiem jak to się zachowa
Za szybko napisałem, owszem program się buduje ale nie chcę się uruchomić. Wyskakuję komunikat że brakuję mysqlcppconn.dll, jak mu ją dostarczę (wkleję do folderu) wyskakuję że jeszcze czegoś mu brakuje, i tak dalej
Pomożecie? ;]
No musisz mu wrzucić do folderu wszystko czego mu brakuje. Do odkrycia co mu jest dokładnie potrzebne możesz użyć dependency walker