aws / aws-sdk-cpp

AWS SDK for C++
Apache License 2.0
1.96k stars 1.06k forks source link

Android compile problems #1272

Closed DanielSanchez97 closed 4 years ago

DanielSanchez97 commented 4 years ago

I am trying to compile the sdk for Android from a windows machine to use with UE4, but I keep getting this error about my compiler not working. I have tried passing the android.toolchain.cmake file from the NDK but that has not helped. I have also tried NDK r18b and it produces the same type of error. Any help would be great!

What platform/OS are you using?

Windows 10 Targeting Android

Which version of the SDK?

1.7.218

What compiler are you using? what version?

Clang

What are your CMake arguments?

-G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;core;cognito-identity;sqs" -DTARGET_ARCH=ANDROID -DNDK_DIR=H:\NVPACK\android-ndk-r15c\

Can you provide a TRACE level log? (sanitize any sensitive information)

-- Building AWS libraries as shared objects -- Android ABI: none specified, defaulting to armeabi-v7a -- Android toolchain unspecified, defaulting to clang -- Android std lib: c++_shared -- Android API level: android-21 -- Building project version: 1.7.218 -- Check for working C compiler: H:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe CMake Error: Generator: execution of make failed. Make command was: nmake /nologo cmTC_8da4c\fast && -- Check for working C compiler: H:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler

"H:/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: H:/awscpp/android/sdk_build/.deps/CMakeFiles/CMakeTmp

Run Build Command(s):nmake /nologo cmTC_8da4c\fast && The system cannot find the file specified
Generator: execution of make failed. Make command was: nmake /nologo cmTC_8da4c\fast &&

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:7 (project)

-- Configuring incomplete, errors occurred! See also "H:/awscpp/android/sdk_build/.deps/CMakeFiles/CMakeOutput.log". See also "H:/awscpp/android/sdk_build/.deps/CMakeFiles/CMakeError.log". CMake Error at CMakeLists.txt:227 (message): Failed to configure third-party libraries.

-- Configuring incomplete, errors occurred!

KaibaLopez commented 4 years ago

Hi @DanielSanchez97, I'm not able to reproduce this error, but it sounds like a problem with cmake and the ndk more than a problem with the sdk. We have documentation here on how to use the sdk on android that might help you:

If you're using Visual Studio though:

DanielSanchez97 commented 4 years ago

Looks like it was an issue with visual studio, so I uninstalled and then reinstalled and it works now! Thanks! @KaibaLopez