syntax error in int main
I got a syntax error for this code :
#include <ros/ros.h>
#include <tf/transform_listener.h>
#include <geometry_msgs/Twist.h>
#include <turtlesim/Spawn.h>
#include "sensor_msgs/PointCloud.h"
#include "tf/message_filter.h"
#include "laser_geometry/laser_geometry.h"
#include <Eigen/Eigen>
#include "std_msgs/String.h"
int main(int argc, char** argv)
{
ros::init(argc, argv, "my_tf_listener");
ros::NodeHandle node;
return 0;
} // end of the main
The error is syntax error near unexpected token `('
What is the possible solution ?
Where exactly is the error and what is the literal error message? Is this the complete source? Did you include ros/ros.h?
The error in the line int main(int argc, char** argv) and yes I have ros/ros.h
Please provided a cut and paste of your error message as well as a reproducable example with your includes. It's quite possible there's invalid code in your includes.
I edited the question by adding the included library.. I cant add pic because I dont have enough points. btw, I am new in ROS
Hi, how did you solve it? I met the same problem