Compile two classes with same name
I'm trying to get rgbdslam to work with fuerte, which seems difficult from what I have culled from other posts. I am now encountering an error with compiling two classes that have the same name. I tried removing one but they both are required by other files. This is an excerpt of the error message I get after trying rosmake rgbdslam
[ 41%] Building CXX object CMakeFiles/rgbdslam.dir/src/main.o
In file included from /opt/ros/fuerte/include/g2o/core/hyper_dijkstra.h:34:0,
from /home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/src/graph_manager.h:53,
from /home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/src/openni_listener.h:30,
from /home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/src/main.cpp:17:
/opt/ros/fuerte/include/g2o/core/hyper_graph.h:59:22: error: redefinition of ‘class g2o::HyperGraph’
/home/linus/Fuerte/sandbox/g2o/include/g2o/core/hyper_graph.h:47:9: error: previous definition of ‘class g2o::HyperGraph’
make[3]: *** [CMakeFiles/rgbdslam.dir/src/main.o] Error 1
make[3]: Leaving directory `/home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/build'
make[2]: *** [CMakeFiles/rgbdslam.dir/all] Error 2
make[2]: Leaving directory `/home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/linus/Fuerte/sandbox/rgbdslam_freiburg/rgbdslam/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package rgbdslam written to:
[ rosmake ] /home/linus/.ros/rosmake/rosmake_output-20121211-223719/rgbdslam/build_output.log
[rosmake-2] Finished <<< rgbdslam [FAIL] [ 9.35 seconds ]
[ rosmake ] Halting due to failure in package rgbdslam.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 32 packages with 1 failures.
It appears that I am close, or at least 41% of the way, to getting the code to compile but I am unsure how to solve the 2-classes-1-name issue with my minimal C++ exposure. In addition, below is a portion of the hyper_graph.h file. The class declaration is near the end
#ifndef G2O_AIS_HYPER_GRAPH_HH
#define G2O_AIS_HYPER_GRAPH_HH
#include <map>
#include <set>
#include <bitset>
#include <cassert>
#include <vector>
#include <limits>
#include <cstddef>
#ifdef _MSC_VER
#include <unordered_map>
#else
#include <tr1/unordered_map>
#endif
#include "g2o_core_api.h"
/** @addtogroup graph */
//@{
namespace g2o {
class G2O_CORE_API HyperGraph {