Android Native API ANativeWindow_setFrameRate is undefined when linking

Viewed 31

Inside my "native.cpp" file I reference the native method; ANativeWindow_setFrameRate

But when I compile I get;

ld: error: undefined symbol: ANativeWindow_setFrameRate

Inside of "CMakeLists.txt" file I specify -landroid to link with API. Why am I getting this error?

Thanks

1 Answers
# add lib dependencies
target_link_libraries(native-activity
    android
    native_app_glue
    **nativewindow**
    EGL
    GLESv1_CM
    log)

You need to add nativewindow libary in you CMakeLists.txt.

Related