Problem in ROS Qt Node
I saw an example:
#include "QDebug"
#include "ros/ros.h"
int main(int argc, char** argv)
{
ros::init(argc, argv, "Qt_test");
qDebug()<<"Hello world";
return 0;
}
Here I made changes in cmakelist.txt as: find_package(Qt4 COMPONENTS QtCore QtGui) include(${QT_USE_FILE})
add_executable(qt_test src/qt_test.cpp) target_link_libraries(qt_test ${QT_LIBRARIES})
Now I tried to do catkin_make then I get the problem:
error: expected primary-expression before ‘int’ ros::init(int argc, char **argv,"qt_test");
error: expected primary-expression before ‘int’ ros::init(int argc, char **argv,"qt_test");
Can any one help this problem or should I need to do changes, any suggestions please. Thanks
is this the entire
qt_test.cpp
? the compiler message suggest that it actually says ros::init(int argc, char **argv,"qt_test");