MySQL Forums
Forum List  »  Connector/C++

get_driver_instance() causes error LNK2005
Posted by: Ramie Al-Omari
Date: April 13, 2011 07:31AM

I have followed the following tutorial: http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-apps-windows-visual-studio.html

Now writing code expained in: http://blog.ulf-wendel.de/?p=215#hello

I get no errors on the includes or declaring the variables. However the line of code:
driver = get_driver_instance();
produces errors that say:
error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) already defined in libcpmt.lib(xmutex.obj) C:\...\msvcprt.lib(MSVCP100.dll) MyProject

I have googled the error but i can't seem to find any useful explanation of what to do.

Options: ReplyQuote


Subject
Views
Written By
Posted
get_driver_instance() causes error LNK2005
3207
April 13, 2011 07:31AM


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.