Include ignored while Creating a Lib

Hello rapidM2M community,

When creating my own Lib, I have the case that various include files within the Lib are ignored and the compiler outputs the messages according to the screenshot.
Is there a guide on how best to go about creating a lib?
The last warning in the screenshot indicates an ignored include file in line 14 in the _.inc.
The _.inc has only 11 lines. What’s the topic here?

Hello @mklueh,
the files within a libs do not have to include each other. When a library is added to a project, the files are automatically included by rapidM2M Studio. To do this, however, the CLIB export declaration must be used to specify which files are to be exported, i.e. are available in the project that uses the library.

It is advisable to integrate an example for testing the library into the library itself. In the main.p of the example, the * .inc files of the library required for the example must be included via #include.

Two templates are available for creating a new library:

Various libraries are already available in the “Sample Lib’s” collection. You can use them to see how a library can be built. For the screenshots above I used the library “sht3x-microtronics”

Important notes

  • The names of the library must be unique. Therefore, it is recommended to insert the company name or an abbreviation in the name. Microtronics uses e.g. “-microtronics” or “-mt”
  • You can use “shares” in the “CLIB export declaration” (see first screenshot) to specify who can use your library by entering the Partner Portal username instead of the “*”.

Kind regards
Josef

1 Like