复现TextSLAM的过程中,遇到的ffi库和gdal库报错 | undefined reference to ffi_closure_alloc@LIBFFI_CLOSURE_7.0‘

报错信息

问题一:

/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_closure_alloc@LIBFFI_CLOSURE_7.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_prep_closure_loc@LIBFFI_CLOSURE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_type_uint8@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to TIFFReadRGBATileExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_type_void@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_prep_cif@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/libgdal.so.26: undefined reference to TIFFReadRGBAStripExt@LIBTIFF_4.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_type_uint32@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_type_sint32@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_call@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libwayland-client.so.0: undefined reference to ffi_type_pointer@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_type_uint64@LIBFFI_BASE_7.0'

问题二:

/usr/bin/ld: /lib/libgdal.so.26: undefined reference to TIFFReadRGBATileExt@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to TIFFReadRGBAStripExt@LIBTIFF_4.0'

问题描述

在复现TextSLAM的过程中,遇到的ffi库和gdal库报undefined reference的错

解决方法

1. 修改CMakeLists

在TARGET_LINK_LIBRARIES最后加入-lffi -lgdal

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CERES_LIBRARIES} ${OpenCV_LIBS} ${QT_LIBRARIES} ${Sophus_LIBRARIES}
    ${EIGEN3_LIBS} -lffi -lgdal)
参考:https://forum.freecad.org/viewtopic.php?style=2&t=75527

https://forum.freecad.org/viewtopic.php?style=2&t=75527

2. 针对gdal库仍找不到的问题,将tiff改为tiff-4.0 版本

过程参考:https://blog.csdn.net/qq_39779233/article/details/127718188

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值