0

The header comments in my main.c are not being processed by doxygen, however if I rename the file from main.c to for example mainn.c it works very well.

Why is main.c treated differently from an other file name? How do I make Doxygen manage main.c as other .c files?

Or alternatively, what is the best practice here? My purpose in Main.c is to put a short (maybe not so short) product description and use cases in the header documentation.

The header file starts as such:

/**********************************************************//**
* @file    main.c
* @author  Somebody
* @brief   Main function and support functions.
* @details 

Then continues with application level things I want to document. Doxygen configuration is the default as it is installed, except for a few items, such as optimised for C, include call charts etc...

Thanks..

Adrian
  • 1
  • 3
  • Well, _how_ does Doxygen treat `main.c`? If you want to add a short description, add `\file main.c` to the file. Also, it depends on your Doxygen configuration. – Zeta Oct 06 '15 at 13:40
  • Possible duplicate of [Doxygen not documenting main function in main.cpp](http://stackoverflow.com/questions/12041274/doxygen-not-documenting-main-function-in-main-cpp) – QuestionC Oct 06 '15 at 14:01

2 Answers2

0

Kinda hard to tell without seeing how you've tried to document it... But make sure you have a line in the main.c file that reads

/*! file */

or

/** @file */

(Doxygen doesn't document global objects by default)

Samidamaru
  • 1,061
  • 7
  • 18
0

After mucking around a bit here is the solution. (As proposed by MPI_What.

As mentioned in my question

/**********************************************************//**
 * @file    main.c
 * @author  Somebody
 * @brief   Main function and support functions.
 * @details

Works for all files except main.c (Of course the line @file main.c is different for the other files. However the following works well for main.c also:

/**********************************************************//**
 * @file    
 * @author  Somebody
 * @brief   Main function and support functions.
 * @details

Why it works is a mystery, but it does. Thanks, Adrian

Adrian
  • 1
  • 3