How to link exe in Cmakelist.txt in ROS
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} "
system(string_output.c_str());
Asked by can-43811 on 2017-06-15 07:41:34 UTC
Answers
Please see if #q235337 answers your question.
Edit:
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.
Asked by gvdhoorn on 2017-06-16 04:28:20 UTC
Comments