MySQL Forums
Forum List  »  Connector/C++

Re: Compiling connector/C++ with Visual Studio 2015
Posted by: Keith Wilcox
Date: May 21, 2016 08:02PM

Hi,

I'm also trying to compile Connector/C++ with VS 2015.

Build errors:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: int __thiscall sql::SQLException::getErrorCode(void)const " (__imp_?getErrorCode@SQLException@sql@@QBEHXZ) MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1
Error LNK2001 unresolved external symbol __imp__get_driver_instance MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall sql::SQLException::getSQLState(void)const " (__imp_?getSQLState@SQLException@sql@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall sql::SQLString::asStdString(void)const " (__imp_?asStdString@SQLString@sql@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall sql::SQLString::SQLString(char const * const)" (__imp_??0SQLString@sql@@QAE@QBD@Z) MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall sql::SQLString::~SQLString(void)" (__imp_??1SQLString@sql@@QAE@XZ) MySQL_BLANK C:\Users\Keith\documents\visual studio 2015\Projects\MySQL_BLANK\MySQL_BLANK\Source.obj 1


Include Directory and Lib directory is set correctly and Linker>Input additional library added: mysqlcppconn.lib. Also, mysqlcppconn.dll is copied to my project's output directory.

Linker>Additional Libraries: C:\Users\Keith\Documents\Visual Studio 2015\Projects\MySQL_BLANK\MySQL%28x86%29\lib
Additional Includes: C:\Program Files\MySQL\Connector.C++ 1.1\include\cppconn;C:\Users\Keith\Documents\Visual Studio 2015\Projects\MySQL_BLANK\MySQL%28x86%29\include;C:\Users\Keith\Desktop\Libs\boost_1_61_0


I've read every lead on Google so far and came to this thread. Hopefully I can get a response from someone! THANKS!

Options: ReplyQuote




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.