Ask Your Question
0

roscpp cannot understand a single cpp keyword

asked 2019-02-12 18:00:28 -0500

umut gravatar image

updated 2019-02-12 18:05:14 -0500

ahendrix gravatar image

I've written a package and I can succesfully use it's node and i have sended the package to my friend. He wanted to compile my package in his pc by catkin make but faced this error:

metobom@metobom-TULPAR-T5-V17-1:~$ rosrun mpk2 mrc.cpp
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 4: //#include: No such file or directory
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 9: using: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 10: double: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 11: float: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 13: struct: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 14: double: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 15: double: command not found
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 16: syntax error near unexpected token `}'
/home/metobom/metos_ws/src/mpk2/src/mrc.cpp: line 16: `};'

So what is the actual problem, can he solve it without reinstalling everything.

Thanks for answers im looking forward to solve it.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-02-12 18:06:57 -0500

ahendrix gravatar image

Your friend needs to compile your C++ code (by running catkin_make) before he can run it, and then needs to run the compile executable instead of trying to run the .cpp file.

edit flag offensive delete link more

Comments

Thank you so much that you gave an answer for such question, I've realized how dummy me and my friend are.

umut gravatar imageumut ( 2019-02-16 14:10:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-02-12 18:00:28 -0500

Seen: 56 times

Last updated: Feb 12