-
Install the following programs to build the driver:
-
Refer to Building the AWS SDK for C++ to install required AWS dependencies.
-
Build the driver in the
build
directory with the following commands:cmake -S . -B build -G "Visual Studio 17 2022" -DMYSQL_DIR="C:\Program Files\MySQL\MySQL Server 8.3" -DMYSQLCLIENT_STATIC_LINKING=TRUE cmake --build build --config Release
-
To build the installer, run the following command:
.\build_installer.ps1 x64 Release "Visual Studio 17 2022"
If the developer powershell processor architecture is x86
for x64
build, it could be changed by the following script for Visual Studio 2022
. Or in Visual Studio, go to Test
then Processor Architecture for AnyCPU Projects
. Select x64
for x64 build.
& 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' -Arch amd64
-
Install the following packages available on
Homebrew
or other package management system of your choice:libiodbc
cmake
mysql-client
mysql
aws-sdk-cpp
-
Refer to Building the AWS SDK for C++ to install required AWS dependencies.
-
Set the environment variable MYSQL_DIR as the path to your
mysql-client
installation location:export MYSQL_DIR=/usr/local/opt/mysql-client
-
Build the driver in the
build
directory with the following commands:cmake -S . -B build -G "Unix Makefiles" -DMYSQLCLIENT_STATIC_LINKING=true -DODBC_INCLUDES=/usr/local/Cellar/libiodbc/3.52.16/include cmake --build build --config Release
Note: you may have a different
libiodbc
version. Change3.52.16
to your respective version.
If you encounter an ld: library not found for -lzstd
error, run the following command, and then rebuild the driver:
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
If you encounter an ld: library not found for -lssl
error, run one of the following commands (depending on what openssl library you have) and then rebuild the driver:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
or
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/[email protected]/lib/
-
Install the following required packages:
sudo apt-get update sudo apt-get install build-essential libgtk-3-dev libmysqlclient-dev unixodbc unixodbc-dev
-
Refer to Building the AWS SDK for C++ to install required AWS dependencies.
-
Build the driver in the
build
directory with the following commands:cmake -S . -B build -G "Unix Makefiles" -DMYSQLCLIENT_STATIC_LINKING=true -DWITH_UNIXODBC=1 cmake --build build --config Release