I'm developing a c++ plugin to get android sensor data.
when I compile my shared library using android-cmake toolchain I've got a linker error :
error: undefined reference to 'ASensorManager_getInstance'
How can I add the right library (-landroid or -lsensor I guess) to the compilation using android-cmake?
Thanks
I found the solution, just add this in your CMakeLists.txt :
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -landroid")
Hope this will be useful for others
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With