ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to link exe in Cmakelist.txt in ROS

asked 2017-06-15 07:41:34 -0600

can-43811 gravatar image

updated 2017-06-16 04:20:01 -0600

gvdhoorn gravatar image

Hi, How to link exe file in CMakelist.txt in ROScpp . Usually we define the source file path (.cpp and .h header)only in Cmakelist but in case if exe file itself being used in source file then how to add rule in Cmakelist.txt.

Below is the rule:

add_executable(property_node ${$LOGG4CPP}_SOURCES} wrapper.cpp main.cpp wrapper.h)

in wrapper.cpp i have been referring one exe in system API inside my code . Through command line i am able to execute the code but in ros getting below error while running the node.

rosrun logpkg property_node

sh: 1: ./parse : not found . Here parse is a exe name which is being used in wrapper.cpp file through system API.
string string_output = "./parse  {args} "
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-16 04:28:20 -0600

gvdhoorn gravatar image

updated 2017-06-16 04:30:43 -0600

Please see if #q235337 answers your question.


How to link exe file in CMakelist.txt in ROScpp

just a note on this: you can't really 'link' a binary into another binary like this. Or at least, it won't do what you seem to be after.

Your problem is more one of paths / current working directory, which is resolved in a different way.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2017-06-15 07:41:34 -0600

Seen: 93 times

Last updated: Jun 16 '17