Reputation: 21
I am trying to install and use the c++ connector. I downloaded the DEBUG version of the connector (I also compile in DEBUG). Linked the mysqlcppconn8.lib to my project, added the libcrypto-1_1.dll, libssl-1_1.dll and mysqlcppconn8-2-vs14.dll to my project directory. It compiles, but crashes when opening a session. It looks like a bad library or compatibility issue.I also added the preprocessor flag STATIC_CONCPP.
I use VS 2019 on Windows 10
Here is the minimal code that crashes:
#include <mysqlx/xdevapi.h>
int main()
{
mysqlx::Session m_DBSession("mysqlx://[email protected]");
}
in the function:
Session(SessionSettings settings)
try
: Session_detail(settings)
{}
CATCH_AND_WRAP
with multiple memory errors like:
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x004EE30C.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x004EE894.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x004EEAD8.
I Tried multiple configurations:
All of the above gives more or less the same issue with bad memory
Upvotes: 0
Views: 236
Reputation: 21
So I found the issue.
The Database I was trying to connect was not accepting the X Protocol and it was throwing a catch. The memory crash lead me to the wrong path thinking it was a compatibility issue.
Upvotes: 0