News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Empty Dogygen Document

Started by newcoder007, December 31, 2020, 07:00:58 AM

Previous topic - Next topic

newcoder007

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;
}

Miguel Gimenez

Did you put something like this at the beginning of the file?


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


newcoder007


Miguel Gimenez


oBFusCATed

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!]

sodev

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)

newcoder007

This still don't work (see attachment).
Here is my 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;
}

sodev

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?

newcoder007

#8
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.

newcoder007

The other configuration settings are in the post before.

sodev

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.

newcoder007

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.

/**
* @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;
}

newcoder007


Miguel Gimenez

Can you attach doxygen.log, or copy its content into code tags (the hash button above the composing window)?

sodev

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.