ROS including headers
Hi all,
How can I make that ROS look for headers files in /usr/include directory when compiling?
I want to use some headers present in that folder, but when I include them in my code and make it, the compiler cannot find the header files. Concretelly, I want to use gtkmm.h, in /usr/include/gtkmm-2.4/gtkmm.h. If I include the file like:
#include <gtkmm-2.4/gtkmm.h>
it works, but it start to ask for another headers. I want it to search in /usr/include for all dependencies.
This is exactly the error I am getting when making the package:
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake ..
[rosbuild] Building package prglade
[rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
[rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
[rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: /home/ruben/ROS_workspace/prglade/build
cd build && make
make[1]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
make[2]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
make[3]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
make[3]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
[ 0%] Built target rospack_genmsg_libexe
make[3]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
make[3]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
[ 0%] Built target rosbuild_precompile
make[3]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
make[3]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
make[3]: se ingresa al directorio «/home/ruben/ROS_workspace/prglade/build»
[ 50%] Building CXX object CMakeFiles/main_node.dir/src/main_node.o
In file included from /home/ruben/ROS_workspace/prglade/src/main_node.cpp:5:0:
/home/ruben/ROS_workspace/prglade/src/viewer.h:5:19: error fatal: gtkmm.h: No existe el archivo o el directorio
compilación terminada.
make[3]: *** [CMakeFiles/main_node.dir/src/main_node.o] Error 1
make[3]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
make[2]: *** [CMakeFiles/main_node.dir/all] Error 2
make[2]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
make[1]: *** [all] Error 2
make[1]: se sale del directorio «/home/ruben/ROS_workspace/prglade/build»
make: *** [all] Error 2
Thanks in advance
The ROS build process does not exclude the header files in
/usr/include
. They should be found, most nodes rely on that. Can you please edit your answer and add the exact error messages you get? See http://ros.org/wiki/SupportCan you please provide the error messages you get?
Please do not create answers just for discussion or updates. Instead, please always edit your original post in such cases. This is not a forum. I updated your original question with your 'answer' and deleted it.