Skip to content Skip to sidebar Skip to footer

Getting Error: Undefined Reference To Function Android Ndk

I have been trying to solve this issue for more than two days, but still no luck. I have no idea what is wrong, I need just to set up a simple NDK project, but it has already take

Solution 1:

I Have found the solution. Here it is

Android ndk(cmake): 'undefined reference to `__android_log_write' when using log api in the second jni library

The problem was in the incorrect order of linking libraries.

This code works great

# Link
target_link_libraries(
            ecg-signal-processor
            log
            android
            firpm_d)

The first arguments should be a library that requires dependencies.

target_link_libraries(<target> [item1 [item2 [...]]]
                      [[debug|optimized|general] <item>] ...)

Post a Comment for "Getting Error: Undefined Reference To Function Android Ndk"