The actual error is a linker error. Undefined reference to get_driver_instance.
Any ideas what the problem is?
This is what I did to install.
- Download and install MinGW to C:\MinGW. http://www.mingw.org/
- Download boost and move the boost folder to C:\MinGW\include
- Download Connector/C++ 1.1.3 http://dev.mysql.com/downloads/connector/cpp/
- Move the mysql_connector/include/*.h (recursively) to C:\MinGW\include\
- Move the mysql_connector/lib/mysqlcppconn-static.lib to C:\MinGW\lib\libmysqlcppconn-static.a
- Move the mysql_connector/lib/mysqlconncpp.dll to C:\MinGW\lib\mysqlconncpp.dll
- Alter cppconn/config.h to remove dupication
- Copy the C++ example and name it test.cpp http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-examples-complete-example-1.html
- add "using namespace sql::mysql" to the file (as recommended)
- run "g++ test.cpp -L C:\MinGW\lib -l mysqlcppconn-static"