fatal error: rosconsole/macros_generated.h: No such file or directory
Hello I am following the ROS tutorials, trying to compile the c++ subscriber using the code that was on the tutorial at This link. I have gotten it to successfully compile before but now I cannot since I have reinstaled Ubuntu 16.04 and ROS Kinetic.
alex@alex-S500CA:$ g++ main2.cpp -o b
In file included from /usr/include/ros/ros.h:40:0,
from main2.cpp:1:
/usr/include/ros/console.h:570:41: fatal error: rosconsole/macros_generated.h: No such file or directory
compilation terminated.
I went into "console.h" and commented out line #541 where it includes this header and when I did that I got a separate error:
alexander@alexander-S500CA:$ g++ main2.cpp -o b
In file included from /usr/include/ros/ros.h:45:0,
from ./roscpp/main2.cpp:3:
/usr/include/ros/node_handle.h:52:34: fatal error: xmlrpcpp/XmlRpcValue.h: No such file or directory
compilation terminated.
I would greatly appreciate anyone's guidance on resolving this.
Please update your question to include your cmakelists and cpp files.
I second @smac. Also, I'd highly recommend to follow the suggested approach with
catkin_make
orcatkin build
...