Ask Your Question
1

catkin_make error: no such file or directory from custom library

asked 2017-09-04 07:06:24 -0600

FábioBarbosa gravatar image

updated 2017-09-04 09:21:24 -0600

Hi! I created my own library and catkin is telling me that the header doesn't exist. Currently i am working on ubuntu 14.04 and ROSIndigo.

This is what my compiler tells me: .../signbot_plugins/src/signbot_core.cpp:1: error: signbot_plugins/classtradutor.h: No such file or directory

Here's my package order:

signbot_plugins/
      include/
            signbot_plugins/
                          classtranslator.h
       msg/
       src/
            classtranslator.cpp
            signbot_core.cpp
     CMakeLists.txt
     package.xml

Heres my CMakeList.txt:

 cmake_minimum_required(VERSION 2.8.3)

 project(signbot_plugins)

  find_package(catkin REQUIRED COMPONENTS
  message_generation
  roscpp
  trajectory_msgs)

   catkin_package(
   INCLUDE_DIRS include
   LIBRARIES signbot_plugins 
   CATKIN_DEPENDS
       message_runtime
       roscpp
        trajectory_msgs
    #  DEPENDS system_lib
  )

   include_directories(
   include
   ${catkin_INCLUDE_DIRS}
  )

 add_library(classtranslator src/classtranslator.cpp)
 add_dependencies(classtranslator ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

 target_link_libraries(classtranslator ${catkin_LIBRARIES})


 add_executable(signbot_core_node src/signbot_core.cpp)
 add_dependencies(signbot_core_node signbot_core_cpp)
 target_link_libraries(signbot_core_node classtranslator ${catkin_LIBRARIES})

Can anyone help me? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2017-09-04 08:14:15 -0600

gvdhoorn gravatar image

From this:

Here's my package order:

signbot_plugins/
      include/
            signbot_plugins/
                          classtranslator.h
      ...

and this:

This is what my compiler tells me:

.../signbot_plugins/src/signbot_core.cpp:1: error: signbot_plugins/classtradutor.h: No such file or directory

I think the problem is that you try to #include a file called classtradutor.h, but you have an actual file called classtranslator.h.

edit flag offensive delete link more

Comments

Note that this is not a ROS problem.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-04 08:14:32 -0600 )edit

Thanks for seeing that. my bad! changed the name of the class, but forgot to change the file name too.

FábioBarbosa gravatar imageFábioBarbosa ( 2017-09-04 08:28:21 -0600 )edit

No problem. Good to hear that solved it.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-04 08:30:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-09-04 07:06:24 -0600

Seen: 393 times

Last updated: Sep 04 '17