MySQL Forums
Forum List  »  Connector/C++

Strange linking issue
Posted by: Teddy Sjöström
Date: September 05, 2009 03:42AM


I have the classical "unresolved external symbol _get_driver_instance". I've googled for hours about it, though, and can't seem to find where I've gone wrong.

First I installed MySQL Server 5.1 with the include/lib. Then I downloaded Connector/C++ and merged the folders. In Visual C++ 2008 Express, I added the include and lib/opt folders, as well as adding "mysqlcppconn.lib" as an additional dependency. The file is found, but even so the unresolved external symbol persists.

Any thoughts on where I messed up? Below is the code to the check-to-see-if-it-compiles program


#include "stdafx.h"

#include <mysql_driver.h>

using namespace sql;

int main(int argc, char* argv[])

Driver *driver;

driver = get_driver_instance();

return 0;


Okay, I found a "solution", and that was to use the x86-version of Connector C/C++ with my 64-vista, 64-MySQL and 64-Visual Studio... don't ask me why, but for some reason it works with x86 and not x64 =/

Options: ReplyQuote

Written By
Strange linking issue
September 05, 2009 03:42AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.