MySQL Forums
Forum List  »  Connector/C++

Re: Compiling connector/C++ with Visual Studio 2015
Posted by: Keith Wilcox
Date: May 26, 2016 10:54AM

Keith Wilcox Wrote:
-------------------------------------------------------
> Hi,
>
> I'm also trying to compile Connector/C++ with VS
> 2015.
>
> Build errors:
> Severity Code Description Project File Line Suppre
> ssion State
> Error LNK2001 unresolved external symbol
> "__declspec(dllimport) public: int __thiscall
> sql::SQLException::getErrorCode(void)const "
> (__imp_?getErrorCode@SQLException@sql@@QBEHXZ) MyS
> QL_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\Ke
> ith\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?$basi
> c_string@DU?$char_traits@D@std@@V?$allocator@D@2@@
> std@@XZ) MySQL_BLANK C:\Users\Keith\documents\visu
> al 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_s
> tring@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:\Us
> ers\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\Visua
> l 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!

I resolved this issue by using Connector/C++ 1.1.7. I was using 1.1 which was generating the errors. Took me 3 days to figure this out and looking at the last reply of this thread -_-

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.