0
$\begingroup$

Rosanswers logo

I'm having a problem including an header file from another package.

In package package_a I have created an header file and I want to include it in package_b. I thought this should be possible using

#include <package_a/header.hpp>

I also have the dependency included in the manifest. I'm getting the error that there is no such file or directory. It's probably a linking/library issue but I'm not familiar with linking.

I'm using this header file to share some definitions (constants) among packages, so if there is an (better) alternative solution feel free to share.


Originally posted by Jeroen on ROS Answers with karma: 13 on 2011-07-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You need to export the include and possibly linker flags of the header in its manifest.


Originally posted by dornhege with karma: 31395 on 2011-07-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by seanarm on 2011-07-08:
Right. Here's an example. It goes in package_a's manifest file and assumes you have your includes in package_a's include directory:

$\endgroup$

Your Answer

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