Author Topic: Empty Dogygen Document  (Read 2932 times)

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Empty Dogygen Document
« on: December 31, 2020, 07:00:58 am »
When I click on DoxyBlocks -> Extract documentation then I get an folder with dogygen/html/index.html.
But the index.html is empty. there is no description of method, parameter or return value.
Why is this so?

That's the code:

/**
 @brief test
 @param x test
 @param y test
 @return test
*/
int add(int x, int y){
    return x+y;
}

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 768
Re: Empty Dogygen Document
« Reply #1 on: December 31, 2020, 11:21:34 am »
Did you put something like this at the beginning of the file?

Code
/**
 * @file
 * @brief Empty user application template
 */

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #2 on: January 01, 2021, 10:28:28 pm »
No, I didn't.
Should I?

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 768
Re: Empty Dogygen Document
« Reply #3 on: January 01, 2021, 10:48:34 pm »
Yes

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: Empty Dogygen Document
« Reply #4 on: January 01, 2021, 11:09:21 pm »
Are you sure? Posting links to doxygen documentation explaining why this is required might be more convincing :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sodev

  • Regular
  • ***
  • Posts: 434
Re: Empty Dogygen Document
« Reply #5 on: January 02, 2021, 01:46:56 am »
To document global objects that are not a class or namespace you need to add at least a @file block before them: https://www.doxygen.nl/manual/docblocks.html#structuralcommands (the "Attention" box further down)

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #6 on: January 02, 2021, 03:48:09 am »
This still don't work (see attachment).
Here is my code:

Code
/**
 * @file File Description
 * @brief Empty user application template
 */

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("%d\n", sum(3,7));
    return 0;
}

/**
 @brief Lorem Ipsum
 @param a Lorem Ipsum
 @param b Lorem Ipsum
 @return Lorem Ipsum
*/
int sum(int a, int b){
    return a+b;
}

Offline sodev

  • Regular
  • ***
  • Posts: 434
Re: Empty Dogygen Document
« Reply #7 on: January 02, 2021, 06:46:24 am »
For your function comment to work i think you need to place the stars on each line. Still, that doesnt explain why the file comment is missing, might be related to the configuration, how does your doxygen configuration file look like?

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #8 on: January 03, 2021, 05:33:16 am »
I put the missing stars in my code. But that's not the reason why it doesn't work.

In the doxygen.log I get this message:
warning: the name 'File' supplied as the argument in the \file statement is not an input file

You can see my configuration in the attachment.
« Last Edit: January 03, 2021, 05:35:57 am by newcoder007 »

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #9 on: January 03, 2021, 05:34:01 am »
The other configuration settings are in the post before.

Offline sodev

  • Regular
  • ***
  • Posts: 434
Re: Empty Dogygen Document
« Reply #10 on: January 03, 2021, 09:20:59 am »
That warning explains something, you must not put anything else after the @file command on the same line or it will be taken as a filename parameter of that command. Since you document the current file you should not supply a parameter to the command.

Additionally it might be necessary to enable EXTRACT_ALL, but i would try first without that setting.

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #11 on: January 03, 2021, 11:00:28 pm »
I've deleted the folder and created a new one.
Now, it looks better but it isn't what I want.
The description of the parameter is not shown and there is no link to the sum function.

Code
/**
 * @file
 * @brief Empty user application template
 */

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("%d\n", sum(3,7));
    return 0;
}

/**
* @brief Lorem Ipsum
* @param a Lorem Ipsum
* @param b Lorem Ipsum
* @return Lorem Ipsum
*/
int sum(int a, int b){
    return a+b;
}

Offline newcoder007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Empty Dogygen Document
« Reply #12 on: January 05, 2021, 02:43:48 am »
No idea?

Offline Miguel Gimenez

  • Lives here!
  • ****
  • Posts: 768
Re: Empty Dogygen Document
« Reply #13 on: January 05, 2021, 10:43:09 am »
Can you attach doxygen.log, or copy its content into code tags (the hash button above the composing window)?

Offline sodev

  • Regular
  • ***
  • Posts: 434
Re: Empty Dogygen Document
« Reply #14 on: January 05, 2021, 12:24:46 pm »
Your output looks correct to me. What you see there is some index of the documentation, if you would click on the main.c link behind the function name it opens the actual documentation page.

Usually i don't create my documentation from source files but from header files and mostly classes, free functions are rare in my code base. Mostly i use the class index to navigate the documentation and don't need anything else. However you can create extra topic pages or other pages to produce a better navigation experience.

Best option is you read the Doxygen documentation yourself to figure out what is possible. There are lots of parameters you can specify in the Doxyfile configuration file to control what gets generated like dependency graphs and the like.