Include headers frome another Fprime module #2464
-
I have my component fprime/cmake/target/build.cmake Line 66 in 8a1612c
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This was commented out because F´ handwritten code should use full paths from the project, framework, or library root to avoid ambiguity between components with the same name. Instead of doing // Risky code:
#include <CommandDispatcherImpl.hpp>
// Better code:
#include <Svc/CommandDispatcherImpl.hpp> This was always the intended way to deal with header includes in F´ and is the expected style/standard. At some point that above line of code leaked in, and we removed it to once again enforce standards. You may, of course, add that line back in within your CMake system....however it is strongly discouraged as it makes it harder to share code to others, and borrow code from others. Please let me know if you have further trouble. |
Beta Was this translation helpful? Give feedback.
This was commented out because F´ handwritten code should use full paths from the project, framework, or library root to avoid ambiguity between components with the same name.
Instead of doing
#include <A.hpp>
use instead#include <Folder/Folder/A.hpp>
and it will work. Here is an example:This was always the intended way to deal with header includes in F´ and is the expected style/standard. At some point that above line of code leaked in, and we removed it to once again enforce standards.
You may, of course, add that line back in within your CMake system....however it is strongly…