-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe common ways of using ModelicaUtilities.h #3455
base: master
Are you sure you want to change the base?
Conversation
The tool must ensure that the header is found by \lstinline[language=C]!#include "ModelicaUtilities.h"! within an \lstinline!Include! annotation (see \cref{annotations-for-external-libraries-and-include-files}); no \lstinline!IncludeDirectory! annotation is needed. | ||
|
||
\begin{example} | ||
The following usage patterns are common: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too much text where real examples seem more useful to me. Might be a good idea to have all three patterns available as proper examples, e. g. in the ModelicaCompliance library or ModelicaReference library or any other dedicated library.
Co-authored-by: Hans Olsson <[email protected]>
\end{example} | ||
|
||
\begin{nonnormative} | ||
When building external libraries, it is not possible to rely on the tool mechanism that provides \filename{ModelicaUtilities.h} for \lstinline!Include! annotations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I could add IncludeDirectory="modelica://Modelica/Resources/C-Sources"
to my annotations of my external library project such that ModelicaUtilities.h is found on the include path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This remark is not about building code in the annotations of a Modelica external function. This is about building an external library with no Modelica code or concepts involved, with the intent of later linking with the library using the Library
-annotation of a Modelica external function.
This was factored out of #3452, as promised in #3452 (comment).
In addition to examples and other non-normative text, this PR makes clear that
#include "ModelicaUtilities.h"
shall work inside anInclude
annotation.