MySQL Forums
Forum List  »  Connector/C++

Mysql Connector 1.10 - Get_driver_instance other fixes did not work
Posted by: Mike D'Onofrio
Date: May 31, 2012 10:34AM

Hi All,

I trying the mysql connector (v 1.1.0, included with the mysql installer I used on my machine), and I am having a hell of a time with it.

I am trying to follow the example here: http://blog.ulf-wendel.de/?p=215#hello

No matter what I do, I get LNK:2001 Unresolve external symbol get_driver_instance()

Here's what I have and have done:
I am using Visual Studio 2008 on Windows 7 X64

I have configured my project initally exactly as described in the blog twice, once statically and once dynamically linking. Both times I get the same unresolved external

I have installed the boost libraries as directed in another forum post, and they are being referenced properly

I have tried defining mysqlcppconn_EXPORTS as mentioned at one point for static linking, which did not work, and for good measure, I also tried this for the dynamic link, which did not work either (as I expected it wouldn't, but I wanted to be thorough) this was also tried with CPPCONN_PUBLIC_FUNC= defined and not defined (for both builds in both debug and release) same result

I have added the directories for the libraries to the linker settings under additional library directories, did not help.

I have tried both debug and release for both builds, same result.

I did try adding using namespace sql::mysql; as directed in another forum post

My compiler command line settings are:
/O2 /Oi /GL /I "C:\Program Files\MySQL\Connector C++ 1.1.0\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "mysqlcppconn_EXPORTS" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Gy /Yu"stdafx.h" /Fp"Release\mysql test.pch" /Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /TP /errorReport:prompt

My linker command line settings are:
/OUT:"f:\mysql test\Release\mysql test.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"Release\mysql test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

I know I am either missing something or I do not have something set properly but I can't for the life of me figure out what.

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql Connector 1.10 - Get_driver_instance other fixes did not work
3359
May 31, 2012 10:34AM


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.