cdoxygendoxygen-addtogroup

Doxygen: warning end of file while inside a group from array creation


This issue is due to doxygen parsing constraints. I am using doxygen 1.8.11 with Eclox (the eclipse plugin) in Kinetis Design Studio for embedded C development.

Almost all of the doxygen compiling works, except I need to have a few very large static arrays. I didn't want to clutter up the main code, so I used a hack I found on these forums (https://stackoverflow.com/a/4645515/6776259):

static const float Large_Array[2000] = {
#include "Comma_Delimited_Text_File.txt"
};

Unfortunately, that hack is causing the compile of my main.c main_module group to fail. With the following error:

warning: end of file while inside a group

I've tried excluding those constants from my main_module group with something like the following:

/*!
**  @addtogroup main_module
**  @{
*/
...
... header code ...
...
/*!
** @}
*/
static const float Large_Array[2000] = {
#include "Comma_Delimited_Text_File.txt"
};
/*!
**  @addtogroup main_module
**  @{
*/
...
More code, definitions, etc.
None of this is generated in the doxygen compile...?
/*!
** @}
*/

This gets rid of the doxygen compiling error, but the compiled doxygen documentation does not include anything after the Large_Array declaration. So it seems the second @addtogroup statement is not working.

Am I missing something simple? Any help is appreciated. Thank you.


Solution

  • If Comma_Delimited_Text_File.txt doesn't have trailing linebreak, then try adding one.

    Doxygen gets confused if include file doesn't end with linebreak. This can break the document generation for other files too, even when they don't seem related. Often this results in missing symbols and broken callgraphs.