SLAM 14th Lecture Compilation Souphus Error Solution

SLAM 14th Lecture Compilation Souphus Error Solution

/usr/bin/c++  -DSophus_EXPORTS -I/usr/include/eigen3  -O3 -DNDEBUG  -fPIC   -Wall -Werror -Wno-unused-variable                    -Wno-unused-but-set-variable -Wno-unknown-pragmas  -o CMakeFiles/Sophus.dir/sophus/so2.cpp.o -c /home/angus/Downloads/slambook-master/3rdparty/Sophus/sophus/so2.cpp
/home/angus/Downloads/slambook-master/3rdparty/Sophus/sophus/so2.cpp: In constructor ‘Sophus::SO2::SO2():
/home/angus/Downloads/slambook-master/3rdparty/Sophus/sophus/so2.cpp:32:26: error: lvalue required as left operand of assignment
   32 |   unit_complex_.real() = 1.;
      |                          ^~
/home/angus/Downloads/slambook-master/3rdparty/Sophus/sophus/so2.cpp:33:26: error: lvalue required as left operand of assignment
   33 |   unit_complex_.imag() = 0.;
      |                          ^~
make[2]: *** [CMakeFiles/Sophus.dir/build.make:66: CMakeFiles/Sophus.dir/sophus/so2.cpp.o] Error 1
make[2]: Leaving directory '/home/angus/Downloads/slambook-master/3rdparty/Sophus/build'
make[1]: *** [CMakeFiles/Makefile2:91: CMakeFiles/Sophus.dir/all] Error 2
make[1]: Leaving directory '/home/angus/Downloads/slambook-master/3rdparty/Sophus/build'
make: *** [Makefile:144: all] Error 2

The so2.cpp in

>unit_complex_.real() = 1.;
>unit_complex_.imag() = 0.;

To

 unit_complex_.real(1.);
 unit_complex_.imag(0.);

Can be solved

Guess you like

Origin blog.csdn.net/qq_38129331/article/details/107443573