abseil / abseil-cpp

Abseil Common Libraries (C++)
https://abseil.io
Apache License 2.0
14.93k stars 2.61k forks source link

Undefined symbols Android NDK On Unbuntu #766

Open jackfong66 opened 4 years ago

jackfong66 commented 4 years ago

[ 74%] Linking CXX shared library libabsl_flags_internal.so CMakeFiles/flags_internal.dir/internal/flag.cc.o:flag.cc:vtable for absl::flags_internal::FlagImpl: error: undefined reference to 'absl::CommandLineFlag::IsRetired() const' CMakeFiles/flags_internal.dir/internal/flag.cc.o:flag.cc:typeinfo for absl::flags_internal::FlagImpl: error: undefined reference to 'typeinfo for absl::CommandLineFlag' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [absl/flags/CMakeFiles/flags_internal.dir/build.make:107: absl/flags/libabsl_flags_internal.so] Error 1 make[1]: [CMakeFiles/Makefile2:1518: absl/flags/CMakeFiles/flags_internal.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

Compiler information: cmake ../ -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/fcgame/android-ndk-r21d/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-26 -DBUILD_SHARED_LIBS=ON

rogeeff commented 4 years ago

Are you building with or without RTTI?