Build errors in eclipse
Using Ubuntu Precise 64 bit. Successfully installed ROS Fuerte and did Beginner Tutorials.
Installed Java JRE 6 Installed Eclipse for C++ Developers (Juno)
Performed all instructions at http://www.ros.org/wiki/IDEs up to, but not including: 5. Running and debugging your executables within Eclipse
I had selected the Beginners_tutorials package (directory) as my project. I selected talker.cpp in the Eclipse IDE to see the code and build it.
I got the following errors:
Description Resource Path Location Type
Method 'sleep' could not be resolved talker.cpp /beginner_tutorials/src line 148 Semantic Error
Field 'data' could not be resolved talker.cpp /beginner_tutorials/src line 122 Semantic Error
Function 'ROS_INFO' could not be resolved talker.cpp /beginner_tutorials/src line 124 Semantic Error
Function 'ok' could not be resolved talker.cpp /beginner_tutorials/src line 109 Semantic Error
Type 'std_msgs::String' could not be resolved talker.cpp /beginner_tutorials/src line 118 Semantic Error
Method 'publish' could not be resolved talker.cpp /beginner_tutorials/src line 133 Semantic Error
Function 'spinOnce' could not be resolved talker.cpp /beginner_tutorials/src line 142 Semantic Error
Field 'data' could not be resolved talker.cpp /beginner_tutorials/src line 124 Semantic Error
Method 'c_str' could not be resolved talker.cpp /beginner_tutorials/src line 124 Semantic Error
Field 'advertise' could not be resolved talker.cpp /beginner_tutorials/src line 80 Semantic Error
Type 'ros::Publisher' could not be resolved talker.cpp /beginner_tutorials/src line 80 Semantic Error
Type 'ros::Rate' could not be resolved talker.cpp /beginner_tutorials/src line 89 Semantic Error
Symbol 'String' could not be resolved talker.cpp /beginner_tutorials/src line 80 Semantic Error
make: *** No rule to make target `/cmake.mk'. Stop. beginner_tutorials C/C++ Problem
Type 'ros::NodeHandle' could not be resolved talker.cpp /beginner_tutorials/src line 49 Semantic Error
Function 'init' could not be resolved talker.cpp /beginner_tutorials/src line 39 Semantic Error
make: /cmake.mk: No such file or directory Makefile /beginner_tutorials line 1 C/C++ Problem
In the IDE I have 2 include directives at the top of the talker.cpp file that give the following message:
Unresolved inclusion: "ros/ros.h"
Unresolved inclusion: "std_msgs/String.h"
Here is the talker.cpp file:
#include "ros/ros.h"
#include "std_msgs/String.h"
#include <sstream>
/** include description
*
* ros/ros.h includes all headers necessary for most common public pieces of the ROS system
* std_msgs/String.h includes the std_msgs/String message, which resides in the std_msgs package.
* This is a header generated automatically from the String.msg file in that package. For more
* information on message definitions, see the msg page.
*/
/** File flow description
* This tutorial demonstrates simple sending of messages over the ROS system.
* This is a Publisher Node
* Here's the condensed version of what's going on:
*
* 1- Initialize the ROS system
* 2- Advertise that we are going to be publishing std_msgs/String messages
* on the chatter topic to the master
* 3- Loop while publishing messages to chatter 10 times a second
*/
int main(int argc, char **argv)
{
/** ros::init() function description ...