Dear all,
I work with coder and will keep the structure of my team.
I’ve added a header file containing some struct only to facilitate decoding of structured register (word and bit level), used by both “state machine block” and “C-Scripts block”.
The structure of my project is:
ProjectRoot/
│
├── My_PLECS_model.plecs
│ My_user_defines.h
└── codegen/
In my model, e.g for state machine, the #include “My_user_defines.h” in C declaration works fine, I can build my state machine without errors, but at compilation it does not works, as the path from codegen is different!
As workaround, I modified my structure as following:
ProjectRootAlternative/
│
├── model/My_PLECS_model.plecs
│ include/My_user_defines.h
└── codegen/
and modified my include in C declaration of state machine as follow:
#include “../include/My_user_defines.h”. In this case, this works correctly when editing the plecs template as well as during compilation, due to same relative path from both location model and codegen.
Is there a way to works without project structure modification (the first project structure)? Is there a solution to add search user files path relative?
Thanks for any suggestion.
Best regards.
Blaise
