1
我目前正在测试Windows NDK C++项目的Visual Studio 2017 RC CMake支持,并遇到问题。“C编译器无法编译简单的测试程序”使用CMake和Android NDK
当我尝试生成CMake的缓存中:
<cmake.exe> -G "Visual Studio 15 2017" -DCMAKE_INSTALL_PREFIX:PATH=<install_path> -DCMAKE_TOOLCHAIN_FILE="<androidNDK_path>\build\cmake\android.toolchain.cmake" -DANDROID_TOOLCHAIN=gcc -DANDROID_ABI="armeabi-v7a with NEON" --DCMAKE_BUILD_TYPE="Debug" <source>
我得到以下错误(铿锵同样的情况,如果我不强行GCC):
The C compiler "<androidNDK_path>/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe" is not able to compile a simple test program.
在此之前,我收到警告,C和CXX编译器的标识是未知的,但我不确定这是相关的。
我得到了暂时的测试项目更多的错误,但他们似乎并不给予了很多的信息,如
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(57,5):
error MSB4018: The "VCMessage" task failed unexpectedly.
和
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(57,5):
error MSB4018: System.FormatException: Index (zero based) must be greater
than or equal to zero and less than the size of the argument list.
我怎么能解决呢?