Skip to content

Android NDK引入后的编译问题 #1

Description

@xiaoyaomeng

Build command failed.
Error while executing process /Users/meetyou/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/meetyou/MyProject/NewYsb/ndk/.externalNativeBuild/cmake/debug/x86 --target FAInHook}
[1/1] Linking CXX shared library ../../../../src/main/jniLibs/x86/libFAInHook.so
FAILED: : && /Users/meetyou/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=i686-none-linux-android --gcc-toolchain=/Users/meetyou/android-ndk-r16b/toolchains/x86-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/meetyou/android-ndk-r16b/sysroot -fPIC -isystem /Users/meetyou/android-ndk-r16b/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=14 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -O0 -std=c++11 -DGUID_ANDROID -DENC_ANTITAMPER -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /Users/meetyou/android-ndk-r16b/platforms/android-14/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libFAInHook.so -o ../../../../src/main/jniLibs/x86/libFAInHook.so src/main/cpp/fa/CMakeFiles/FAInHook.dir/FAInHook.cpp.o src/main/cpp/fa/CMakeFiles/FAInHook.dir/MemHelper.cpp.o src/main/cpp/fa/CMakeFiles/FAInHook.dir/main.cpp.o -llog -ldl -latomic -lm "/Users/meetyou/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/Users/meetyou/MyProject/NewYsb/ndk/src/main/cpp/fa/FAInHook.cpp:108: error: undefined reference to 'FAHook::Instruction::createBackStub(FAHook::HookInfo*)'
/Users/meetyou/MyProject/NewYsb/ndk/src/main/cpp/fa/instruction/IntelInstruction.h:24: error: undefined reference to 'vtable for FAHook::IntelInstruction'
/Users/meetyou/android-ndk-r16b/toolchains/x86-4.9/prebuilt/darwin-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/Users/meetyou/MyProject/NewYsb/ndk/src/main/cpp/fa/FAInHook.cpp:230: error: undefined reference to 'FAHook::Instruction::enableJumpStub(FAHook::HookInfo*)'
/Users/meetyou/MyProject/NewYsb/ndk/src/main/cpp/fa/FAInHook.cpp:238: error: undefined reference to 'FAHook::Instruction::disableJumpStub(FAHook::HookInfo*)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions