0
$\begingroup$

Rosanswers logo

I've been struggling with this a couple of times before and always found work-arounds to overcome, but there must be a better way.

I develop my ROS-related code with Eclipse. So I always use make eclipse-project to create and update .project file as described on the IDEs ROS Wiki page. The problem is, make eclipse-project doesn't usually automatically grab package dependencies between packages I wrote.

I never have any problems with dependencies between packages installed from binary packages. But the weird thing is I never have any problems with eg. crawling trough packages I wrote with roscd or using other ros CLI commands to explore my package tree neither. So ROS_PACKAGE_PATH is set correctly. I also edited manifest.xml to add

<depend package="my_package"/>

so that should be right as well. But then I check Project properties -> C/C++ Include Paths and Preprocessor Symbols and the required package includes are missing.

What are the common pitfalls I can be dealing with?

EDIT: OK I think a probable cause of my problems is me not knowing anything about the correct usage of the tag in the manifest.xml file. Is this the only documentation to it?


Originally posted by tom on ROS Answers with karma: 1079 on 2011-08-02

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

OK, it's definitely it, after adding compiler and linker flags in manifest.xml all works fine. It also seems the only documentation to it is the one stated in the question, so a certain knowledge of makefile syntax is assumed. I, for instance, added this:

<export>
    <cpp cflags="-I${prefix}/src" lflags="-L${prefix}/lib -Wl,-rpath,${prefix}/lib -lMyLib"/>
</export>

This will cause my header files from src to be exported (I'm not following the convention to place header files in an include directory, so maybe you'll have to replace src with include), a library directory added to linker's knowledge and a library libMyLib.so (or .o) placed in one of the above declared directories to be linked.


Originally posted by tom with karma: 1079 on 2011-08-02

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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