OS: Windows
Compiler: Visual Studio 2022 (MFC) C++
Build bit: 32/64 bit
Build item: Mysql Connector C++ source file
Build mode: Visual Studio 2022 build mode (/Mtd,/MDd)
I tried to download the binary code from the official site (https://dev.mysql.com/downloads/connector/cpp/) and use it, but the binary code generated an _ITERATOR_DEBUG_LEVEL error when compiled with "Mtd and MDd".
However, my environment requires "Mtd and MDd", so I obtained the Mysql Connector C++ source file from
https://dev.mysql.com/downloads/connector/cpp/) and Git Hub.
I want to build a build that can be built in wjsms /Mtd and /MDd build modes.
However, the manual on your official site explains individual build options, but there is no example of a combination of build options for the state I need, so I don't know how to combine them, so I'm asking.
I want to build in /Mtd and /MDd build modes.
That is, I want to build the Mysql Connector C++ source with the CMake below and create the "mysqlcppconn-static.lib" file.
However, the binary code obtained from the official download site can only be used in the "mysqlcppconn-static.lib" file "/MT" or "/MD" when installing, so
I need a combination of options to use it in "/MTd" or "/MDd" as well.
cmake .. -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=../install -DMYSQLCPPCONN_DO_BUILD_TESTS=OFF -DBOOST_ROOT=../../boost_1_88_0 -DWITH_SSL=ON -DOPENSSL_ROOT_DIR=../../openssl -DOPENSSL_INCLUDE_DIR=../../openssl/include -DOPENSSL_LIBRARIES="../../openssl/lib/libssl.lib;../../openssl/lib/libcrypto.lib" -DWITH_ZLIB=ON -DWITH_ZLIB_INCLUDE_DIR=../../zlib/include -DWITH_ZLIB_LIB_DIR=../../zlib/lib -DCMAKE_VERBOSE_MAKEFILE=ON
Below is the combination of CMake options that I used to build. However, the result is that the file "mysqlcppconn8-static.lib" is generated, which is X DevAPI-enabled and not what I want to use.
I would like to be able to use "Mtd" /Mdd" in Visual Studio builds as well, so please modify the combination of options that I use above.