Catkin not finding Header Files
Hi all, i'm pulling my hair out trying to get my project to compile. I'm using some third party header files which I have copied to /home/pi/ros_catkin_ws/src/eyebot_testing/include/eyebot_testing, the parent header file is eyebot.h which then includes all others.
In my node file (~/ros_catkin_ws/src/eyebot_testing/src/eyebot_testing_node.cpp) I have this:
#include "ros/ros.h"
#include "eyebot_testing/eyebot.h"
int main()
{
MOTORDriveRaw(1, 0);
return 0;
}
And my CMakeList.txt file has the following:
cmake_minimum_required(VERSION 2.8.3)
project(eyebot_testing)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp rospy std_msgs
)
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
${catkin_INCLUDE_DIRS}
)
link_directories(/home/pi/eyebot/lib)
## Declare a C++ library
#add_library(eyebot_testing
# src/${PROJECT_NAME}/eyebot_testing.cpp
# )
## Declare a C++ executable
add_executable(eyebot_testing_node src/eyebot_testing_node.cpp)
## Specify libraries to link a library or executable target against
find_library(eyebot_testing_node /home/pi/eyebot/lib/)
target_link_libraries(eyebot_testing_node
${catkin_LIBRARIES}
wiringPi
mpsse
X11
lirc_client
m
opencv_core
opencv_highgui
opencv_imgproc
eyebot
)
## Mark cpp header files for installation
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
This is the command i'm using to just compile my package:
cd /home/pi/ros_catkin_ws/build_isolated/eyebot_testing && sudo /home/pi/ros_catkin_ws/install_isolated/env.sh make VERBOSE=3 -j4 -l4BC
The verbose mode show the include directories ( -I ) are being added in an earlier step and the Library i'm using is being linked in the later step, however i'm still getting a method not found error:
pi@rospi:~/ros_catkin_ws/src/eyebot_testing $ cd /home/pi/ros_catkin_ws/build_isolated/eyebot_testing && sudo /home/pi/ros_catkin_ws/install_isolated/env.sh make VERBOSE=3 -j4 -l4BC
/usr/bin/cmake -H/home/pi/ros_catkin_ws/src/eyebot_testing -B/home/pi/ros_catkin_ws/build_isolated/eyebot_testing --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/pi/ros_catkin_ws/build_isolated/eyebot_testing/CMakeFiles /home/pi/ros_catkin_ws/build_isolated/eyebot_testing/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/pi/ros_catkin_ws/build_isolated/eyebot_testing'
make -f CMakeFiles/eyebot_testing_node.dir/build.make CMakeFiles/eyebot_testing_node.dir/depend
make[2]: Entering directory '/home/pi/ros_catkin_ws/build_isolated/eyebot_testing'
cd /home/pi/ros_catkin_ws/build_isolated/eyebot_testing && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/pi/ros_catkin_ws/src/eyebot_testing /home/pi/ros_catkin_ws/src/eyebot_testing /home/pi/ros_catkin_ws/build_isolated/eyebot_testing /home/pi/ros_catkin_ws/build_isolated/eyebot_testing /home/pi/ros_catkin_ws/build_isolated/eyebot_testing/CMakeFiles/eyebot_testing_node.dir/DependInfo.cmake --color=
Dependee "/home/pi/ros_catkin_ws/src/eyebot_testing/include/eyebot_testing/eyebot.h" is newer than depender "CMakeFiles/eyebot_testing_node.dir/src/eyebot_testing_node.cpp.o".
Clearing dependencies in "/home/pi/ros_catkin_ws/build_isolated/eyebot_testing/CMakeFiles/eyebot_testing_node.dir/depend.make".
Scanning dependencies of target eyebot_testing_node
make[2]: Leaving directory '/home/pi/ros_catkin_ws/build_isolated/eyebot_testing'
make -f CMakeFiles/eyebot_testing_node.dir/build.make CMakeFiles/eyebot_testing_node.dir/build
make[2]: Entering directory '/home/pi/ros_catkin_ws/build_isolated/eyebot_testing'
/usr/bin/cmake -E cmake_progress_report /home/pi/ros_catkin_ws/build_isolated/eyebot_testing/CMakeFiles 1
[100%] Building CXX object CMakeFiles/eyebot_testing_node.dir/src/eyebot_testing_node.cpp.o
/usr/bin/c++ -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"eyebot_testing\" -I/home/pi/ros_catkin_ws/src/eyebot_testing/include ...