error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive] Eigen::Map<const g2o::Vector7d> v(m); [closed]

asked 2018-07-11 21:27:15 -0500

tengfei han gravatar image

updated 2018-07-13 01:21:56 -0500

when compiling LSD-slam on my laptop, I received these unexpected errors

Actually, the source is coming from the part of an open source project I try to rerun. I did it before several days ago. However, I encounter this problem yesterday. here are my steps as below

cd catkin_ws
catkin_make

    GlobalMapping/g2oTypeSim3Sophus.h:96:20: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
       Eigen::Map<const g2o::Vector7d> v(m);
                        ^~~
    /home/htf/catkin_ws/src/third_parties/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:33: error: template argument 1 is invalid
       Eigen::Map<const g2o::Vector7d> v(m);
                                     ^
    /home/htf/catkin_ws/src/third_parties/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:96:38: error: invalid conversion from ‘const double*’ to ‘int’ [-fpermissive]
       Eigen::Map<const g2o::Vector7d> v(m);
                                          ^
    /home/htf/catkin_ws/src/third_parties/lsd_slam/lsd_slam_core/src/GlobalMapping/g2oTypeSim3Sophus.h:97:38: error: no matching function for call to ‘Sophus::Sim3Group<double>::exp(int&)’
     setMeasurement(Sophus::Sim3d::exp(v));

does anyone has encountered this problem? hope to get some clues, Thank you in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by tengfei han
close date 2018-10-03 04:46:43.408774

Comments

Do you mean compiling not running? Can you tell us how you downloaded the source, setup your work space, and tried to build it.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-12 08:08:37 -0500 )edit

@PeteBlackerThe3rd I have edited my question, thank you for your comment

tengfei han gravatar image tengfei han  ( 2018-07-13 01:23:53 -0500 )edit