Ubuntu安装Sophus报错:so2.cpp:error: lvalue required as left operand of assignment. unit_complex_.real() = 1.;


ubuntu安装Sophus报错(系统版本:18.04)

遇到的问题:

  /Sophus/sophus/so2.cpp:32:26: error: lvalue required as left operand of assignment
    unit_complex_.real() = 1.;

  /Sophus/sophus/so2.cpp:33:26: error: lvalue required as left operand of assignment
    unit_complex_.imag() = 0.;

解决办法:

  找到/Sophus/sophus目录下so2.cpp文件,如下代码:

    SO2::SO2()    

    {     

      unit_complex_.real() = 1.;     

      unit_complex_.imag() = 0.;
    }

  将其修改为:

    SO2::SO2()    

    {     

      unit_complex_.real(1.);     

      unit_complex_.imag(0.);
    }

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM