undefined reference to `ANativeWindow_fromSurface'

在调用ANativeWindow_fromSurface()和ANativeWindow_setBuffersGeometry()出现编译错误:
undefined reference to `ANativeWindow_setBuffersGeometry’
undefined reference to ‘ANativeWindow_fromSurface’

解决方法:
在CMakeList.txt中添加android共享库

find_library(
        android
        android
)

target_link_libraries(
        render

        ${log-lib}
        ${egl}
        ${gles}
        ${android}
)

你可能感兴趣的:(Android)