Just created a new project from scratch (here are the exact steps I did)
I am using latest version of VS 2019
- Create new project
- console application -> next - >name of the project - >create
- Downloaded the debug connector here:
https://dev.mysql.com/downloads/connector/cpp/
- Downloaded the windows, x86, DEBUG version
in the project settings:
- Added the included folder: mysql-connector-c++-8.0.31-win32\include
- In the linker path, added mysql-connector-c++-8.0.31-win32\lib\vs14\debug and C:\game\mysql-connector-c++-8.0.31-win32\lib\debug
- added the library in the input section: mysqlcppconn8.lib
- added in the C++ precompiled option: STATIC_CONCPP
- Copied the 3 DLLs into the c:\windows directory
Here is the code of the app:
#include <iostream>
#include <mysqlx/xdevapi.h>
int main()
{
mysqlx::Session m_DBSession("mysqlx://root@127.0.0.1");
}
This crashes here:
Session(SessionSettings settings)
try
: Session_detail(settings)
{}
CATCH_AND_WRAP
And here are the output errors:
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x00EFF03C.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x00EFF5C4.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x00EFF808.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Unhandled exception at 0x7620E062 in testconnector.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x00EFF808.
Exception thrown at 0x7A8577E4 (vcruntime140d.dll) in testconnector.exe: 0xC0000005: Access violation reading location 0x00000004.
Any help is welcome. The problem is clearly not the code itself, but some type of mismatch between 2 components. But since it is a new project from scratch... I have no clue