0
$\begingroup$

Rosanswers logo

Hi everyone,

I have one package (lets call it a) and inside this is the CMakeLists.txt file, manifest.xml and a few .h and .cpp files of code that talk to each other in the src folder. My src file is starting to get a little big so ideally I want to have more than one package (such as one called b) that has its own CMakeLists.txt file, manifest.xml and src file. What I want is the code in the src folder for package a to be able to communicate with the src folder for package b. I added the line: <depend package="a"/> to the manifest.xml in package b but I am unable to read the src code from package a.

Perhaps my way of thinking is wrong. If so, could you explain to me the best way to partition the code would be? If I am on the right track, what have I missed out?

Thanks in advance.


Originally posted by JP on ROS Answers with karma: 95 on 2013-10-05

Post score: 0


Original comments

Comment by JP on 2013-10-06:
Thanks for the reply. I do not have any cflags and Iflags in my manifest.xml for my package. (I used ros-create pkg). how to I get these?

Comment by jdorich on 2013-10-06:
This ROS answer (http://answers.ros.org/question/33779/how-do-i-link-an-executable-with-library-in-other-package/) covers all the things you have to do.

Comment by JP on 2013-10-06:
Thanks so much!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

See this ROS answer. You have to export cflags and lflags in package a in your case mentioned.


Originally posted by jdorich with karma: 211 on 2013-10-06

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by JP on 2013-10-06:
Thank you!!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.