Qt and non-Qt nodes in the same package?
I have used qt_create to make a Qt ROS package. However, when I try to add another basic ROS node (one that doesn't use Qt), I get the following error, stating that I have duplicate main functions:
make[3]: Entering directory `/home/phillip/ROS_workspace/ros-swarm-tools/interpreter/build'
Linking CXX executable ../bin/interface
CMakeFiles/interface.dir/src/interpreter.o: In function `main':
/home/phillip/ROS_workspace/ros-swarm-tools/interpreter/src/interpreter.cpp:158: multiple definition of `main'
CMakeFiles/interface.dir/src/main.o:/home/phillip/ROS_workspace/ros-swarm-tools/interpreter/src/main.cpp:20: first defined here
collect2: ld returned 1 exit status
It seems as though cmake is trying to link the new ROS node (interpreter) with the old one (interface) in the ../bin/ folder. I am not familiar enough with cmake to know how to modify CMakeLists.txt to prevent it from doing this. Am I right in thinking that this is the problem? If so, how would I go about fixing it, or is there an easy tutorial somewhere for combining multiple nodes in a ROS Qt project?