Skip to content

Commit 65227d9

Browse files
authored
add instructions to install aws dependencies (#153)
1 parent 8b9c4cd commit 65227d9

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Building the AWS SDK for C++
2+
The driver supports AWS IAM and AWS Secrets Manager authentication by using [AWS SDK for C++](https://docs.aws.amazon.com/sdk-for-cpp/). The driver requires `aws-cpp-sdk-core`, `aws-cpp-sdk-rds`, and `aws-cpp-sdk-secretsmanager`. You can either build the SDK yourself directly from the source using the script under `scripts` folder or [download the libraries using a package manager](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/sdk-from-pm.html). The script will install the SDK under `aws_sdk/install` folder. The driver will look for SDK dependencies through `aws_sdk/install` folder and `CMAKE_PREFIX_PATH` environment variable.
3+
> **_NOTE:_** On Winodws, depending on the use case, you may build the SDK as a static library or dynamic library. On Linux and macOS, you should always build the SDK as a dynamic library.
4+
5+
## Windows
6+
If you want to build and run the driver unit tests, you need to build the SDK as static library, as the unit test binary will link every dependency statically.
7+
```
8+
.\scripts\build_aws_sdk_win.ps1 x64 Debug OFF "Visual Studio 16 2019"
9+
```
10+
If you want to build the driver DLL, you need to build the SDK as dynamic library, as the driver DLL will link the SDK dynamically.
11+
```
12+
.\scripts\build_aws_sdk_win.ps1 x64 Release ON "Visual Studio 16 2019"
13+
```
14+
## Linux/macOS
15+
```
16+
./scripts/build_aws_sdk_unix.sh Release
17+
```
18+
19+
## Troubleshoot
20+
See https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/troubleshooting-cmake.html

docs/building-the-aws-driver/BuildingTheAwsDriver.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
- [Visual Studio](https://visualstudio.microsoft.com/downloads/)
88
> The driver has been built successfully using `Visual Studio 2019`, and it may not build correctly with other versions. When installing Visual Studio, ensure the `Visual C++ 2019` and `Visual Studio Tools for CMake` packages are also installed.
99
- [MySQL Server](https://dev.mysql.com/downloads/installer/)
10-
2. Build the driver in the `build` directory with the following commands:
10+
11+
2. Refer to [Building the AWS SDK for C++](./BuildingAwsSdkCpp.md) to install required AWS dependencies.
12+
13+
3. Build the driver in the `build` directory with the following commands:
1114
```
1215
cmake -S . -B build -G "Visual Studio 16 2019" -DMYSQL_DIR="C:\Program Files\MySQL\MySQL Server 8.0" -DMYSQLCLIENT_STATIC_LINKING=TRUE
1316
cmake --build build --config Release
@@ -19,11 +22,14 @@
1922
- `cmake`
2023
- `mysql-client`
2124
- `mysql`
22-
2. Set the environment variable MYSQL_DIR as the path to your `mysql-client` installation location:
25+
26+
2. Refer to [Building the AWS SDK for C++](./BuildingAwsSdkCpp.md) to install required AWS dependencies.
27+
28+
3. Set the environment variable MYSQL_DIR as the path to your `mysql-client` installation location:
2329
```
2430
export MYSQL_DIR=/usr/local/opt/mysql-client
2531
```
26-
3. Build the driver in the `build` directory with the following commands:
32+
4. Build the driver in the `build` directory with the following commands:
2733
```
2834
cmake -S . -B build -G "Unix Makefiles" -DMYSQLCLIENT_STATIC_LINKING=true -DODBC_INCLUDES=/usr/local/Cellar/libiodbc/3.52.15/include
2935
cmake --build build --config Release
@@ -51,7 +57,10 @@ export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/[email protected]/lib/
5157
sudo apt-get update
5258
sudo apt-get install build-essential libgtk-3-dev libmysqlclient-dev unixodbc unixodbc-dev
5359
```
54-
2. Build the driver in the `build` directory with the following commands:
60+
61+
2. Refer to [Building the AWS SDK for C++](./BuildingAwsSdkCpp.md) to install required AWS dependencies.
62+
63+
3. Build the driver in the `build` directory with the following commands:
5564
```
5665
cmake -S . -B build -G "Unix Makefiles" -DMYSQLCLIENT_STATIC_LINKING=true -DWITH_UNIXODBC=1
5766
cmake --build build --config Release

0 commit comments

Comments
 (0)