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