基于AWS C++ SDK构建C++应用报错:aws/core/Aws.h未找到
Ugh, I’ve been there too—wasting a day and a half on a missing step the AWS tutorial completely glosses over is so frustrating. Let me walk you through the simple fix that resolved this exact issue for me:
The Root Issue
You followed the official AWS guide to download, compile, and install the C++ SDK on your Mac, but when building your own application, the compiler throws an error saying aws/core/Aws.h can’t be located. This happens because the build system doesn’t automatically know where the SDK’s header files were installed.
The Quick Fix
Add this line to your project’s CMakeLists.txt file:
include_directories(/usr/local/include)
This explicitly tells CMake to look for header files in /usr/local/include—the default directory where the AWS C++ SDK installs its headers on macOS.
My Rant (Relatable, Right?)
It’s ridiculous that the AWS tutorial fails to mention this step. Most of us assume that running the SDK’s installation script would handle setting up these include paths automatically, but clearly that’s not the case here. I spent hours re-compiling the SDK, checking permissions, and debugging build logs before stumbling on this simple fix.
内容的提问来源于stack exchange,提问作者John Bode

