Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

Linking errors when trying to compile connector (no replies)

$
0
0
Really need your help, I'm trying to update my old project using new version of mysqlx connector. Compiling it in debug mode. I'm using VS2015 64bit mysql-connector-c++-8.0.15-src.

following this doc.https://dev.mysql.com/doc/dev/connector-cpp/8.0/building.html. I run cmake with the following configuration

cmake -DWITH_SSL=C:\Program Files\OpenSSL -DBUILD_STATIC=yes -DCMAKE_INSTALL_PREFIX=E:\mysql_build -G "Visual Studio 14 2015 Win64" -DSTATIC_MSVCRT=yes

"cmake --build . --target install --config Debug"

here are my dependencies
Normaliz.lib ws2_32.lib Crypt32.lib Wldap32.lib libcurl_a_debug.lib libcrypto.lib libssl.lib User32.lib Gdi32.lib mysql_connector-mt.lib

but when I use this code

void DatabaseMysql::Connect() {

::mysqlx::Session sess("mysqlx://root:zaq123@localhost:13009");
}

I get linking errors + warnings
1>ScannerServer.obj : warning LNK4217: locally defined symbol ?print@Value@common@mysqlx@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z (protected: virtual void __cdecl mysqlx::common::Value::print(class std::basic_ostream<char,struct std::char_traits<char> > &)const ) imported in function "public: virtual void __cdecl mysqlx::Value::print(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?print@Value@mysqlx@@UEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)

1>ScannerServer.obj : warning LNK4217: locally defined symbol ??0Value@common@mysqlx@@QEAA@XZ (public: __cdecl mysqlx::common::Value::Value(void)) imported in function "public: __cdecl mysqlx::Value::Value(void)" (??0Value@mysqlx@@QEAA@XZ)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ?get_type@Value@common@mysqlx@@QEBA?AW4Type@123@XZ (public: enum mysqlx::common::Value::Type __cdecl mysqlx::common::Value::get_type(void)const ) imported in function "public: enum mysqlx::Value::Type __cdecl mysqlx::Value::getType(void)const " (?getType@Value@mysqlx@@QEBA?AW4Type@12@XZ)

1>ScannerServer.obj : warning LNK4217: locally defined symbol ??1Value@common@mysqlx@@QEAA@XZ (public: __cdecl mysqlx::common::Value::~Value(void)) imported in function "int `public: __cdecl mysqlx::Value::Value(void)'::`1'::dtor$0" (?dtor$0@?0???0Value@mysqlx@@QEAA@XZ@4HA)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ?set_from_uri@Settings_impl@common@mysqlx@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z (public: void __cdecl mysqlx::common::Settings_impl::set_from_uri(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __cdecl mysqlx::SessionSettings::SessionSettings(class mysqlx::string const &)" (??0SessionSettings@mysqlx@@QEAA@AEBVstring@1@@Z)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ?to_utf8@Impl@string@mysqlx@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV23@@Z (public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl mysqlx::string::Impl::to_utf8(class mysqlx::string const &)) imported in function "public: __cdecl mysqlx::string::operator class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)const " (??Bstring@mysqlx@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)

1>ScannerServer.obj : warning LNK4217: locally defined symbol ?from_utf8@Impl@string@mysqlx@@SAXAEAV23@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z (public: static void __cdecl mysqlx::string::Impl::from_utf8(class mysqlx::string &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __cdecl mysqlx::string::string(char const *)" (??0string@mysqlx@@QEAA@PEBD@Z)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ??0Error@mysqlx@@QEAA@PEBD@Z (public: __cdecl mysqlx::Error::Error(char const *)) imported in function __catch$??$?0PEBD@Session@mysqlx@@QEAA@PEBD@Z$2
1>ScannerServer.obj : warning LNK4217: locally defined symbol ??0DbDoc@mysqlx@@QEAA@XZ (public: __cdecl mysqlx::DbDoc::DbDoc(void)) imported in function "public: __cdecl mysqlx::Value::Value(void)" (??0Value@mysqlx@@QEAA@XZ)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ??1DbDoc@mysqlx@@QEAA@XZ (public: __cdecl mysqlx::DbDoc::~DbDoc(void)) imported in function "public: __cdecl mysqlx::Value::~Value(void)" (??1Value@mysqlx@@QEAA@XZ)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ??0Session_detail@internal@mysqlx@@IEAA@AEAVSettings_impl@common@2@@Z (protected: __cdecl mysqlx::internal::Session_detail::Session_detail(class mysqlx::common::Settings_impl &)) imported in function "public: __cdecl mysqlx::Session::Session(class mysqlx::SessionSettings)" (??0Session@mysqlx@@QEAA@VSessionSettings@1@@Z)
1>ScannerServer.obj : warning LNK4217: locally defined symbol ??1Session_detail@internal@mysqlx@@MEAA@XZ (protected: virtual __cdecl mysqlx::internal::Session_detail::~Session_detail(void)) imported in function "public: virtual __cdecl mysqlx::Session::~Session(void)" (??1Session@mysqlx@@UEAA@XZ)

1>ScannerServer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl mysqlx::common::Settings_impl::Settings_impl(void)" (__imp_??0Settings_impl@common@mysqlx@@QEAA@XZ) referenced in function "public: __cdecl mysqlx::internal::Settings_detail<struct mysqlx::internal::Settings_traits>::Settings_detail<struct mysqlx::internal::Settings_traits>(void)" (??0?$Settings_detail@USettings_traits@internal@mysqlx@@@internal@mysqlx@@QEAA@XZ)

1>ScannerServer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl mysqlx::common::Settings_impl::~Settings_impl(void)" (__imp_??1Settings_impl@common@mysqlx@@QEAA@XZ) referenced in function "public: __cdecl mysqlx::internal::Settings_detail<struct mysqlx::internal::Settings_traits>::~Settings_detail<struct mysqlx::internal::Settings_traits>(void)" (??1?$Settings_detail@USettings_traits@internal@mysqlx@@@internal@mysqlx@@QEAA@XZ)

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>