Re: Compiling connector/C++ with Visual Studio 2015
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 -_-
Subject
Views
Written By
Posted
6220
December 31, 2015 08:34AM
2549
February 20, 2016 08:26AM
2531
February 26, 2016 06:15AM
2013
February 26, 2016 07:50AM
5246
March 07, 2016 10:27AM
2187
May 02, 2016 08:06AM
2664
May 21, 2016 08:02PM
Re: Compiling connector/C++ with Visual Studio 2015
2219
May 26, 2016 10:54AM
1833
May 26, 2016 03:16PM
1727
May 26, 2016 05:32PM
2396
June 01, 2016 08:45AM
1740
June 03, 2016 12:18PM
2056
June 08, 2016 04:02AM
2645
June 10, 2016 07:15AM
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.