【关键字】
OH_Camera / libohcamera.so
【问题描述】
DevEco Studio从4.0.0升级到4.1.0后,使用OH_Camera相关的c++接口,编译时报错,例如
ld.lld: error: undefined symbol: OH_Camera_GetCameraManager
和
warning: deleting pointer to incomplete type 'OH_NativeXComponent' may cause undefined behavior [-Wdelete-incomplete]
【解决方案】
直接引入的libohcamera.so,不会报错。
target_link_libraries(shrendersdk PUBLIC${EGL-lib} ${GLES-lib} ${hilog-lib} ${libace-lib} ${libnapi-lib} ${libuv-lib} ${libpixelmap-lib} libohcamera.so)