I am using Android Studio 2.2.2 with cmake and Android NDK. I have a problem linking the .a library (Static lib).
Here is my cmake:
cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
add_library(lib_webp SHARED IMPORTED )
set_target_properties(lib_webp PROPERTIES IMPORTED_LOCATION
src/main/jni/${ANDROID_ABI}/libwebp.so)
add_library(
game-lib
SHARED
src/main/cpp/main.cpp
src/main/cpp/android_native_app_glue.c
)
target_include_directories(game-lib PRIVATE
../../../../libs/headers/android
)
include_directories($ENV{NDK_MODULE_PATH}/sources/android/native_app_glue/)
target_link_libraries(
game-lib
log
android
OpenSLES
z
GLESv2
EGL
dl
)
add_definitions(-g -DANDROID -Wno-write-strings -fsigned-char -Wno-conversion-null)
TARGET_LINK_LIBRARIES(game-lib libtheoraplayer.a)
My linker reports an error
arm-linux-androideabi / bin \ ld: error: cannot find -ltheoraplayer
error: undefined link to 'TheoraVideoManager :: TheoraVideoManager (int)'
which is part of libtheoraplayer.a. Has anyone had a similar problem? Any idea how to solve this?
I have a Static lib libororaplayer.a present in this place. I even have a shared library libtheoraplayer.so, but I can't link it either.
Any advice would be appreciated.
Greetings.