aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Unable to use both aws iot sdk and aws sdk together

Open chaarirami opened this issue 3 years ago • 0 comments

Describe the bug

I'm having difficulties using the mentioned sdks together.

  1. I'm unable to build the aws sdk using MinGW (As far as I know, MinGW is not supported yet). This is causing us difficulties since we're working on a big database that is all compiled using MinGW. These are some of the errors when building with CMake:
  • /aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-common/include/aws/common/array_list.inl:99:48: error: unknown conversion type character 'z' in format [-Werror=format=]
  • aws-sdk/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-common/include/aws/common/array_list.inl:99:85: error: format '%p' expects argument of type 'void*', but argument 4 has type 'long long unsigned int' [-Werror=format=]
  • /aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-common/include/aws/common/array_list.inl:99:9: error: too many arguments for format [-Werror=format-extra-args] I got my MinGW version from https://winlibs.com/. Not sure if using another version might help.
  1. As a workaround, I tried to build both skds using Visual Studio toolset. This worked, however there were linking errors. With a bit of research, I found out that I had to build the skds as shared libraries. This didn't work out in the aws iot sdk, causing the following error: \aws-iot-sdk\aws-iot-device-sdk-cpp-v2\jobs\include\aws/iotjobs/JobStatus.h(61,25): err or C2059: Syntaxfehler: "__declspec(dllexport)" [C:\Users\KONVOI04\CMAKE_PACKAGES\aws-iot-sdk\build\jobs\IotJobs-cpp.vc xproj]

The optimal solution would be to build the aws sdk using MinGW tools. I appreciate the work you are putting into this project, but not being able to use MinGW tools to compile the sdk is causing us a lot of trouble and headache. I know from going through the issues that this feature is demanded by many developers.

I'd appreciate any help from you.

Expected Behavior

Both SDKs can be used together

Current Behavior

see above

Reproduction Steps

Command for building with Visual Studio:

git clone --recursive https://github.com/aws/aws-iot-device-sdk-cpp-v2.git
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%installDir% -DBUILD_SHARED_LIBS=ON -DBUILD_DEPS=ON ../aws-iot-device-sdk-cpp-v2
cmake --build . --target install

Commands for building with MinGW:

    git clone --recursive https://github.com/aws/aws-iot-device-sdk-cpp-v2.git
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=%installDir% -DCMAKE_CXX_FLAGS="-w -Wa,-mbig-obj" -G "MinGW Makefiles" ..
    cmake --build . --target install

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

latest

Compiler and Version used

gcc (MinGW-W64 x86_64-ucrt-posix-seh) 11.3.0 / clang version 14.0.1

Operating System and version

Windows 11

chaarirami avatar Aug 23 '22 10:08 chaarirami