1

There is a native Android (c++) library project within a VS2019 solution. The project references some libraries (*.so) in order to be built.

The project is built successfully when libraries are in the project folder. However, if they are in a sub-folder, "Additional Library Directories" option does not seem to help. (absolute an relative paths have been tried)

Options: enter image description here

The generated command line args:

-o"bin\ARM64\Debug\libVideoIO_Native_Android.so" -Wl,-rpath-link="C:\\Microsoft\AndroidNDK64\android-ndk-r16b\platforms\android-26\arch-arm64\usr\lib" -Wl,-z,relro "libavcodec.so" "libavformat.so" "libavutil.so" "libswresample.so" "libswscale.so" -Wl,-soname="libVideoIO_Native_Android.so" -shared -Wl,-z,noexecstack -Wl,--verbose -Wl,--no-undefined -l"android_support" -l"c++_static" -l"c++abi" -l"log" -l"android" -Wl,-L"runtimes\android-arm64\so" -Wl,-L"C:\\Microsoft\AndroidNDK64\android-ndk-r16b\platforms\android-26\arch-arm64\usr\lib" -Wl,-L"C:\\Microsoft\AndroidNDK64\android-ndk-r16b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\lib\gcc\aarch64-linux-android\4.9.x" -Wl,-L"C:\\Microsoft\AndroidNDK64\android-ndk-r16b\sources\cxx-stl\llvm-libc++\libs\arm64-v8a" -Wl,-z,now 

How can I specify the location of additional *.so files for the linker ?
(CLang 5.0 and android-26 API are used).

dajuric
  • 2,373
  • 2
  • 20
  • 43
  • 1
    I believe this is an answer to a duplicate question and I hope that it helps: https://stackoverflow.com/questions/40307291/visual-c-cross-platform-android-include-prebuilt-shared-library If this answers, we should close this as a duplicate. I'd love to see alternative solutions to do this, however. – M2tM Nov 12 '19 at 22:12

0 Answers0