Several unresolved external errors
Hi guys,
I really need your help. I am trying for days now but I can't solve the probleme by myself.
I am trying to use the C++ Connector. I followed the example on the c++ conectors web page. I added the include directory to my project, I added the missing sqlstring file, I added the folder for the lib files and added the lib file mysqlcppconn-static.lib and the mysqllib.lib. Because I use the static library I added the Preprocessor directive: CPPCONN_PUBLIC_FUNC=.
I also installed boost and added the include directory for the boost-folder.
For my test I only use this code:
#include "stdafx.h"
#include "stdio.h"
#include "mysql_connection.h"
#include "mysql_driver.h"
int _tmain(int argc, _TCHAR* argv[])
{
sql::mysql::MySQL_Driver *driver;
driver = sql::mysql::get_mysql_driver_instance();
return 0;
}
And I get 126 errors. :(
If anybody has an idea, please let me know. Thank you very much for any advice.
Here are some examples (the error messages are in german):
Fehler 1 error LNK2001: Nicht aufgelöstes externes 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)". c:\Users\heinrich\documents\visual studio 2010\Projects\sqltestcpp\sqltestcpp\mysqlcppconn-static.lib(mysql_resultset_metadata.obj) sqltestcpp
Fehler 2 error LNK2001: Nicht aufgelöstes externes 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)". c:\Users\heinrich\documents\visual studio 2010\Projects\sqltestcpp\sqltestcpp\mysqlcppconn-static.lib(mysql_art_rset_metadata.obj) sqltestcpp
Oh, and I used everything in Release mode.
Greetings, Basti
Edited 1 time(s). Last edit at 02/16/2011 02:28AM by Bastian Heinrich.