0

I installed the AWS SDK for C++ on my Ubuntu box using the instructions given in the Amazon doc:

https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup.html

I was able to compile the SDK without error.

Then I followed the README for building the examples, for C++. when I run Cmake I get the following error:

CMake Error at CMakeLists.txt:15 (find_package):
  By not providing "FindAWSSDK.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "AWSSDK", but
  CMake did not find one.

  Could not find a package configuration file provided by "AWSSDK" with any
  of the following names:

    AWSSDKConfig.cmake
    awssdk-config.cmake

  Add the installation prefix of "AWSSDK" to CMAKE_PREFIX_PATH or set
  "AWSSDK_DIR" to a directory containing one of the above files.  If "AWSSDK"
  provides a separate development package or SDK, be sure it has been
  installed.

However AWSSDKConfig.cmake is definitely on my system:

$  locate AWSSDKConfig.cmake
/home/robert/Documents/GitHub/aws-sdk-cpp/cmake/AWSSDKConfig.cmake

So I tried adding the path to the configuration file directly using the CMake CMAKE_PREFIX_PATH command line argument:

sudo cmake -D CMAKE_PREFIX_PATH="/home/robert/Documents/GitHub/aws-sdk-cpp/cmake/" /home/robert/Documents/GitHub/aws-doc-sdk-examples/cpp/example_code/dynamodb

But then I get this set of error messages:

CMake Error at /home/robert/Documents/GitHub/aws-sdk-cpp/cmake/AWSSDKConfig.cmake:27 (include):
  include could not find load file:

    /home/robert/Documents/GitHub/aws-sdk-cpp/cmake/AWSSDKConfigVersion.cmake
Call Stack (most recent call first):
  CMakeLists.txt:15 (find_package)


CMake Error at /home/robert/Documents/GitHub/aws-sdk-cpp/cmake/AWSSDKConfig.cmake:29 (include):
  include could not find load file:

    /home/robert/Documents/GitHub/aws-sdk-cpp/cmake/platformDeps.cmake
Call Stack (most recent call first):
  CMakeLists.txt:15 (find_package)


CMake Error at /home/robert/Documents/GitHub/aws-sdk-cpp/cmake/AWSSDKConfig.cmake:86 (message):
  AWS SDK for C++ is missing, please install it first
Call Stack (most recent call first):
  CMakeLists.txt:15 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/robert/Documents/GitHub/aws-doc-sdk-examples-build/dynamodb/CMakeFiles/CMakeOutput.log".

I figure I must be doing something fundamentally wrong at this point. How can I make this work?

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
  • 1
    It seems that `AWSSDKConfig.cmake` script you have is not an installed one, but just copied from somewhere. Or you forgot to **install** the project and trying to use the one which just built. – Tsyvarev Aug 20 '20 at 22:12
  • @Tsyvarev I followed the AWS SDK instructions. Didn't see a separate step for installing the project after I built it. Do you have a link for a doc that explains the install proceedure? – Robert Oschler Aug 20 '20 at 23:52
  • 1
    Which **exact** instructions did you follow? E.g.the section "Building the SDK from Source" ends with `sudo make install` call, which installs the package. – Tsyvarev Aug 21 '20 at 00:01

0 Answers0