problems building - executable package and dependent library package in the same catkin workspace [closed]
Hi,
I'm having some problems getting to grips with catkin/cmake.
Essentially I have 2 CPP packages in the same workspace: 'serial_port' - which is a library build, and 'sonar_interface' - which is an executable "driver" (depends on serial_port)
I cannot figure out how to go about setting up the CMake files to compile this workspace. At the moment I just keep getting: sonar_interface.cpp:7:27: fatal error: serial_port.hpp: No such file or directory
... the offending line is just from me including serial_port.hpp: #include <serial_port.hpp>
I think this is a problem to do with me not linking properly, but I'm very new to all this so not sure where to start
Any help / tutorial links would be much appreciated,
Thanks
This is not a linker problem, but a compiler problem, probably wrong configuration of include directories. The ROS default would place includes in include/pkg, so the include should read
#include "serial_port/serial_port.hpp"
, but I don't know how your package is layed out.Please post more information about your packages, e.g. links to the repos. Than we can provide better support.