ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
An ugly solution is to export the package A sources as C++ header files, which could be compiled in B as a separate library using the desired CFLAGS.
I can think of reasons not to do it that way. Some of them might be mitigated by placing the headers in an impl
subdirectory, referenced like this:
#include <A/impl/lib_sources.hpp>
2 | suggest separate package for headers |
An ugly solution is to export the package A sources as C++ header files, which could be compiled in B as a separate library using the desired CFLAGS.
I can think of reasons not to do it that way. Some of them might be mitigated by placing the headers in an impl
subdirectory, referenced like this:
#include <A/impl/lib_sources.hpp>
If I were actually going to maintain some code this way, I might prefer creating a separate package for the header files which both A and B could use as needed.