我是靠谱客的博主 舒心大地,这篇文章主要介绍「 Linux调试错误 」Sophus/sophus/so2.cpp:33:26:error: lvalue required as left operand of assignment,现在分享给大家,希望可以做个参考。
一、问题描述
安装Sophus库时,cmake通过,在make时,发生错误。提示错误如下:
复制代码
1
2
3
4
51. Sophus/sophus/so2.cpp:33:26:error: lvalue required as left operand of assignment unit_complex_.real() = 1.; 2. Sophus/sophus/so2.cpp:33:26:error: lvalue required as left operand of assignment unit_complex_.imag() = 1.;*
二、解决方法
打开 Sophus/sophus/so2.cpp文件。
将:
复制代码
1
2
3
4
5
6SO2::SO2() { unit_complex_.real() = 1.; unit_complex_.imag() = 0.; }
改成:
复制代码
1
2
3
4
5
6SO2::SO2() { unit_complex_.real(1.); unit_complex_.imag(0.); }
*亲测有效
最后
以上就是舒心大地最近收集整理的关于「 Linux调试错误 」Sophus/sophus/so2.cpp:33:26:error: lvalue required as left operand of assignment的全部内容,更多相关「内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复