Adding lines into CMakeList.txt makes an error. I need help
Hello,
Firstly i need to say im totally beginner on ROS.I managed to install it and my Professor wanted to me complete these tasks;
-Create a ROS package with your name.
-Create two nodes, a chatter which publishes std_msgs and a listener to listen to chatter.
-The message you are required to send will be assigned for each one separately.
-The listener should get the message and print it using ROS_INFO function.
So i managed to create work space , but i stucked at somewhere that wants me to add these lines into my_package/CMakeLists.txt.
lines are ;
add_executable(name_of_node_chatter src/01.cpp) ,
target_link_libraries(name_of_node_chatter ${catkin_LIBRARIES}) ,
add_dependencies(name_of_node_chatter my_package_generate_messages_cpp)
But when i add them into CMakeList.txt like this ; link text
After i save this txt file i try to run catkin_make command on terminal.It gaves me this error ; link text
I don't know what to do , please can you help me to fix this problem.
Hi, the target you want to build is
name_of_node_listener
orname_of_node_chatter
? In the screenshot ofCMakeLists.txt
you shared, it's writtenname_of_node_listener
but here you wrotename_of_node_listener
. Could you please add your entireCMakeLists.txt
to your main question text? You can use the edit button/link for that. It would be easier for people to review. Thank you.I guess i made huge mistake , without defining the chatter , i put listener code on CMakeList.txt that is why terminal gives me that 01.cpp error. In this case 01.cpp is chatter and 02.cpp is listener one.And im trying to run the code without chatter.Thank you for your answer. @tcchiang and also @nkhedekar
@tcchiang can you please update your question with a copy and paste of the errors instead of using images? Please see the Support page.
@jayess, I'm sorry but I am not the original poster. Please tag @Karandiru, thanks.
@tcchiang Sorry about that. @Karandiru can you please update your question with a copy and paste of the errors instead of using images?
I can not access to the ubuntu right now that is why i can not copy the errors from terminal.I editted the lines.Problem is still same. @jayess