Discrete Optimal Search Library (DOSL): A template-based C++ library for searching, path-finding and exploring discrete spaces such as graphs and simplicial complexes
I just add lib path in cmake and try to add header.
Got "multiple definition of" Error
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function get_indentation_string[abi:cxx11](int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:329: multiple definition ofget_indentation_stringabi:cxx11'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:329: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function boost::exception_detail::error_info_container_impl::release() const': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of_DOSL_VERBOSE_FUN_DEPTH'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:141: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function print_indentation(int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:336: multiple definition ofprint_indentation(int)'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:336: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function _uint_to_binary[abi:cxx11](unsigned int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:397: multiple definition of_uint_to_binary[abi:cxx11](unsigned int)'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:397: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function std::_Rb_tree<boost::system::error_category const*, std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > >, std::_Select1st<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >, std::less<boost::system::error_category const*>, std::allocator<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > > >::_M_erase(std::_Rb_tree_node<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >*)': /usr/include/c++/5/bits/basic_string.tcc:210: multiple definition of_dosl_warn_counts[abi:cxx11]'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function boost::detail::sp_counted_impl_p<boost::exception_detail::error_info_base>::~sp_counted_impl_p()': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition ofDOUBLE_TO_INT_FACTOR'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function std::_Rb_tree<boost::system::error_category const*, std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > >, std::_Select1st<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >, std::less<boost::system::error_category const*>, std::allocator<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > > >::find(boost::system::error_category const* const&)': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of_dosl_is_tab_printed'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function std::__atomic_base<int>::fetch_add(int, std::memory_order)': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition ofDOSL_RUNTIME_VERBOSE_SWITCH'
CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:141: first defined here
collect2: error: ld returned 1 exit status
make[2]: [/home/kg/ros_ws/devel/.private/space_exploration/lib/space_exploration/space_exploration] Error 1
make[1]: [CMakeFiles/space_exploration.dir/all] Error 2
make: *** [all] Error 2
I just add lib path in cmake and try to add header. Got "multiple definition of" Error
CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function
get_indentation_string[abi:cxx11](int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:329: multiple definition of
get_indentation_stringabi:cxx11' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:329: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionboost::exception_detail::error_info_container_impl::release() const': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of
_DOSL_VERBOSE_FUN_DEPTH' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:141: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionprint_indentation(int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:336: multiple definition of
print_indentation(int)' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:336: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In function_uint_to_binary[abi:cxx11](unsigned int)': /home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:397: multiple definition of
_uint_to_binary[abi:cxx11](unsigned int)' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/home/kg/gits/DOSL/dosl/planners/../utils/macros_constants.tcc:397: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionstd::_Rb_tree<boost::system::error_category const*, std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > >, std::_Select1st<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >, std::less<boost::system::error_category const*>, std::allocator<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > > >::_M_erase(std::_Rb_tree_node<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >*)': /usr/include/c++/5/bits/basic_string.tcc:210: multiple definition of
_dosl_warn_counts[abi:cxx11]' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionboost::detail::sp_counted_impl_p<boost::exception_detail::error_info_base>::~sp_counted_impl_p()': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of
DOUBLE_TO_INT_FACTOR' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionstd::_Rb_tree<boost::system::error_category const*, std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > >, std::_Select1st<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > >, std::less<boost::system::error_category const*>, std::allocator<std::pair<boost::system::error_category const* const, std::unique_ptr<boost::system::detail::std_category, std::default_delete<boost::system::detail::std_category> > > > >::find(boost::system::error_category const* const&)': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of
_dosl_is_tab_printed' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:454: first defined here CMakeFiles/space_exploration.dir/src/SpaceExplorationInterface.cpp.o: In functionstd::__atomic_base<int>::fetch_add(int, std::memory_order)': /home/kg/ros_ws/src/space_exploration/src/SpaceExplorationInterface.cpp:134: multiple definition of
DOSL_RUNTIME_VERBOSE_SWITCH' CMakeFiles/space_exploration.dir/src/space_exploration_node.cpp.o:/usr/include/c++/5/bits/basic_string.h:141: first defined here collect2: error: ld returned 1 exit status make[2]: [/home/kg/ros_ws/devel/.private/space_exploration/lib/space_exploration/space_exploration] Error 1 make[1]: [CMakeFiles/space_exploration.dir/all] Error 2 make: *** [all] Error 2