Ask Your Question
0

Having make file issue;

asked 2015-03-09 15:27:24 -0500

rnunziata gravatar image

updated 2015-03-09 19:32:19 -0500

Redefine: If I need include files from another installed package how do I add them to my makefile or is it how I reference them in the import?

I am fairly new to Makefiles. Can someone give me a start on understanding the issue. I am getting following error:

0%] Built target robot_odometry
/home/richard/catkin_ws/src/tracker/src/markerlessCreator.cpp:1:31: fatal error: FernImageDetector.h: No such file or directory
 #include "FernImageDetector.h"
                               ^
compilation terminated.
/home/richard/catkin_ws/src/tracker/src/markerlessDetector.cpp:1:23: fatal error: CvTestbed.h: No such file or directory
 #include "CvTestbed.h"
                       ^
compilation terminated.
make[2]: *** [tracker/CMakeFiles/tracker.dir/src/markerlessDetector.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [tracker/CMakeFiles/tracker.dir/src/markerlessCreator.cpp.o] Error 1
make[1]: *** [tracker/CMakeFiles/tracker.dir/all] Error 2
make: *** [all] Error 2

My makefile is as follows: the missing files are in /opt/ros/indigo/include/ar_track_alvar/

  project(tracker)

    find_package(
      catkin REQUIRED COMPONENTS
      OpenCV 
      roscpp
      ar_track_alvar 
      )


    catkin_package(
      DEPENDS boost
      LIBRARIES
      CATKIN_DEPENDS
      ar_track_alvar
      )


    ###########
    ## Build ##
    ###########

     include_directories(include ${catkin_INCLUDE_DIRS} ${ar_track_alvar_INCLUDE_DIRS} )
     include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})

 add_executable(markerlessCreator src/markerlessCreator.cpp)
 target_link_libraries(markerlessCreator ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})

 add_executable(markerlessDetector src/markerlessDetector.cpp)
 target_link_libraries(markerlessDetector ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-09 20:41:50 -0500

rnunziata gravatar image

my bad, miss understanding when copying code from other project

edit flag offensive delete link more

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: 2015-03-09 15:27:24 -0500

Seen: 92 times

Last updated: Mar 09 '15