/usr/bin/ld: error: cannot find -lceres

/usr/bin/ld: error: cannot find -lceres

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:55: error: undefined reference to 'ceres::Problem::SetParameterization(double*, ceres::LocalParameterization*)'

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:56: error: undefined reference to 'ceres::Problem::SetParameterization(double*, ceres::LocalParameterization*)'

../../../../src/Modules/Tools/src/pose_graph_2d_1.cpp:71: error: undefined reference to 'ceres::Problem::SetParameterBlockConstant(double const*)'

首先

/usr/local/lib 目录下有libceres.a

查看1 ld链接是否为下面的

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ ls -ll ld
lrwxrwxrwx 1 root root 19 12月 10 16:03 ld -> x86_64-linux-gnu-ld

如果不是:

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ sudo ln -sf x86_64-linux-gnu-ld /usr/bin/ld

改过来

查看2

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/usr/bin$ cd /etc/ld.so.conf.d/
sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ ls
fakeroot-x86_64-linux-gnu.conf  x86_64-linux-gnu.conf
i386-linux-gnu.conf             zz_i386-biarch-compat.conf
libc.conf
sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ cat libc.conf
# libc default configuration
/usr/local/lib
没有添加 然后

sfe1012@sfe1012-ThinkPad-P15-Gen-1:/etc/ld.so.conf.d$ sudo ldconfig

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值