# Where Does "make" Look to Find its Header Files

Where Does "catkin_make", "rosmake" and "make" Look to Find its Header Files? (In my question, "make" represents "catkin_make", "rosmake" and "make" :) ) Because of the update of ROS versions, some header files which work in older version do not exist in new version of ROS, which turns out to be a "cannot find xxx header file" error when "make"-ING. What I am going to do is to find out those old header files I need and copy to the path where "make" search for those header files(Is it an advisable behavior?).

edit retag close merge delete

Sort by » oldest newest most voted

There is not much magic going on behind the lines. The usual includes that are added by the ROS system are: /opt/ros/distro/include and anything that a depend package exports (usually include in the package).

For what you are trying to do: Don't! This will NOT fix your problem. Something has changed somewhere. Copying the old headers will most likely not turn back this change. The underlying code the headers referred to is still missing. Even if you also added that you'd probably gain something incompatible.

more

Just to expand on @dornhege 's answer for those who come to this via google etc.: The CMake command include_directories ( http://www.cmake.org/cmake/help/v3.0/... ) is what you are looking for, e. g.

include_directories( your/relative/path /your/absolute/path )


will cause your build system to search for headers in each of the respective given folders...

However, for your particular question the second paragraph of @dornhege 's answer is the relevant and right one

more