subh83 / DOSL

Discrete Optimal Search Library (DOSL): A template-based C++ library for searching, path-finding and exploring discrete spaces such as graphs and simplicial complexes
GNU General Public License v3.0
44 stars 23 forks source link

multiple definition of functions #1

Closed kgandhi24 closed 5 years ago

kgandhi24 commented 5 years ago

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

subh83 commented 5 years ago

Thanks for the bug report. This has been fixed in v3.31.