Open dvdface opened 5 months ago
I have built this binary , the linker it used is not correct, how to fix it? OP5601:/data/local/tmp # file rmgr-ssim rmgr-ssim: ELF shared object, 64-bit LSB arm64, dynamic (/lib/ld-linux-aarch64.so.1), BuildID=61161c20e0b0fac068e2b49eca46da3e986d034a, not stripped
Okay, After check the source code detailly, I found it's very easy to write a Android.mk to build it instead of using default CMake Configuration.
how to build for android by android-ndk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) LOCAL_MODULE := ssim LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/src/.cpp) (wildcard $(LOCAL_PATH)/src/.h) include $(BUILD_EXECUTABLE)
2. run ndk-build command in the project root directory to build project
ndk-build APP_BUILD_SCRIPT=Android.mk NDK_PROJECT_PATH=.
3. artifacts are under following directory
```<project root>/libs/```
I have built this binary , the linker it used is not correct, how to fix it? OP5601:/data/local/tmp # file rmgr-ssim rmgr-ssim: ELF shared object, 64-bit LSB arm64, dynamic (/lib/ld-linux-aarch64.so.1), BuildID=61161c20e0b0fac068e2b49eca46da3e986d034a, not stripped
After I fixed the linker problem, it still has problem, so I give it up.
D:\Users\80362386\Desktop\ssim-master>GenerateSolution.cmd Which version of Visual Studio do you want to generate a solution for? 1- Visual Studio 12 (2013) 2- Visual Studio 14 (2015) 3- Visual Studio 15 (2017) 4- Visual Studio 16 (2019) 5- Visual Studio 17 (2022) 5
Which platform to you want to generate for? 1- x86 2- AMD64 3- x86 (Clang) 4- AMD64 (Clang) 5- ARM 6- ARM64 6
Calling CMake as follows: "cmake" -G "Visual Studio 17 2022" -DRMGR_SSIM_BUILD_CLI=ON -DRMGR_SSIM_BUILD_SAMPLE=ON -DRMGR_SSIM_BUILD_TESTS=ON -A ARM64 "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\lib\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\bin\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\bin\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_INSTALL_PREFIX:PATH=D:\Users\80362386\Desktop\ssim-master\package\windows-aarch64-msvc19.3" "-DCPACK_PACKAGE_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\package" "-DCPACK_SYSTEM_NAME:STRING=windows-aarch64-msvc19.3" "D:\Users\80362386\Desktop\ssim-master"
CMake Error: Error: generator platform: ARM64 Does not match the platform used previously: Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. 请按任意键继续. . .
D:\Users\80362386\Desktop\ssim-master>GenerateSolution.cmd Which version of Visual Studio do you want to generate a solution for? 1- Visual Studio 12 (2013) 2- Visual Studio 14 (2015) 3- Visual Studio 15 (2017) 4- Visual Studio 16 (2019) 5- Visual Studio 17 (2022) 5
Which platform to you want to generate for? 1- x86 2- AMD64 3- x86 (Clang) 4- AMD64 (Clang) 5- ARM 6- ARM64 6
Calling CMake as follows: "cmake" -G "Visual Studio 17 2022" -DRMGR_SSIM_BUILD_CLI=ON -DRMGR_SSIM_BUILD_SAMPLE=ON -DRMGR_SSIM_BUILD_TESTS=ON -A ARM64 "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\lib\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\bin\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\bin\windows-aarch64-msvc19.3-vs2022" "-DCMAKE_INSTALL_PREFIX:PATH=D:\Users\80362386\Desktop\ssim-master\package\windows-aarch64-msvc19.3" "-DCPACK_PACKAGE_DIRECTORY:PATH=D:\Users\80362386\Desktop\ssim-master\package" "-DCPACK_SYSTEM_NAME:STRING=windows-aarch64-msvc19.3" "D:\Users\80362386\Desktop\ssim-master"
CMake Error at CMakeLists.txt:26 (project): Failed to run MSBuild command:
to get the value of VCTargetsPath:
Exit code: 1
-- Configuring incomplete, errors occurred!