How do I debug example files?

171 views
Skip to first unread message

Nicolas Perez

unread,
Apr 22, 2022, 2:14:24 PM4/22/22
to gtsam users
I modified a couple of cpp files in the examples folder. I'm trying to debug one of them, but I don't really know what I am doing (I admit, I am not amazing with c++).

Does anyone know of a nice way to setup debugging in GTSAM? Particularly for debugging example files? Vscode seems like a nice tool for debugging, and I already have Vscode installed. I am preferably looking for a debugger that is easy to setup. I tried debugging using Vscode but I get an error:

> Executing task: C/C++: gcc build active file <

 

Starting build...

/usr/bin/gcc -fdiagnostics-color=always -g /home/nicolas/gtsam/examples/Pose2SLAMExample_graphviz.cpp -o /home/nicolas/gtsam/examples/Pose2SLAMExample_graphviz

In file included from /usr/local/include/gtsam/base/Matrix.h:27:0,

                 from /usr/local/include/gtsam/base/Manifold.h:22,

                 from /usr/local/include/gtsam/base/Lie.h:26,

                 from /usr/local/include/gtsam/slam/BetweenFactor.h:21,

                 from /home/nicolas/gtsam/examples/Pose2SLAMExample_graphviz.cpp:17:

/usr/local/include/gtsam/base/OptionalJacobian.h:22:10: fatal error: Eigen/Dense: No such file or directory

 #include <Eigen/Dense>

          ^~~~~~~~~~~~~

compilation terminated.

 

Build finished with error(s).



I don't get this error when I build and run the example file from the build folder:

make Pose2SLAMExample_graphviz.run

Reply all
Reply to author
Forward
0 new messages