documenting C structure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

documenting C structure

MURESIANU Philippe

Hi,

 

When I declare a structure in my .c source file, the reference of the structure is not found by Doxygen.

If I declare it in my header file (for test purpose), Doxygen finds the reference.

I declare my structure in .c source on purpose and I can’t declare it in the header file.

How can I fix my issue and make Doxygen finds the reference of this structure ?

 

Thanks.

 

Regards,

 

Philippe


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: documenting C structure

albert
Please add some code and the version of doxygen you used, so we can see what you tried and it is easier to give an advise.

Albert

On Thu, Jul 7, 2016 at 11:33 AM, MURESIANU Philippe <[hidden email]> wrote:

Hi,

 

When I declare a structure in my .c source file, the reference of the structure is not found by Doxygen.

If I declare it in my header file (for test purpose), Doxygen finds the reference.

I declare my structure in .c source on purpose and I can’t declare it in the header file.

How can I fix my issue and make Doxygen finds the reference of this structure ?

 

Thanks.

 

Regards,

 

Philippe


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: documenting C structure

MURESIANU Philippe

Hi Albert,

 

Here is an example of the code and doxygen comments:

 

If I do the way below, ‘S_MyStruct’ is not found by Doxygen:

 

mySource.c:

 

/****************

\struct S_MyStruct

\brief  blablabla

****************/

typedef struct {

unsigned short  W_len;

unsigned char    B_nb;

unsigned char    Ba_Buf[10];

} S_MyStruct;

 

/****************

\brief  it’s my function that uses \ref S_MyStruct

****************/

void myFunction()

{

}

 

Doxygen reports in warnings.txt:

mySource.c: 50: warning: unable to resolve reference to ‘S_MyStruct’ for \ref command

 

 

BUT, if I put the structure declaration in “mySource.h”, ‘S_MyStruct’ is found by Doxygen.

 

Doxygen version: 1.8.9.1

 

Thanks.

 

Regards,

 

Philippe

 

 

 

De : Albert [mailto:[hidden email]]
Envoyé : jeudi 7 juillet 2016 19:26
À : MURESIANU Philippe
Cc : [hidden email]
Objet : Re: [Doxygen-users] documenting C structure

 

Please add some code and the version of doxygen you used, so we can see what you tried and it is easier to give an advise.

Albert

 

On Thu, Jul 7, 2016 at 11:33 AM, MURESIANU Philippe <[hidden email]> wrote:

Hi,

 

When I declare a structure in my .c source file, the reference of the structure is not found by Doxygen.

If I declare it in my header file (for test purpose), Doxygen finds the reference.

I declare my structure in .c source on purpose and I can’t declare it in the header file.

How can I fix my issue and make Doxygen finds the reference of this structure ?

 

Thanks.

 

Regards,

 

Philippe


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users

 


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: documenting C structure

Brian Henning

I have an anecdote related to this.  In my experience, a comment block delineated by /**… */with more than two asterisks at the start is ignored by Doxygen.  When I adopted doxygen markup into our project at work, we then had two competing comment block styles, and I ended up having to put a space after the second * to then have a longer line of *s, like so:

 

/***************

** \brief Doxygen doesn’t see this one the way we used to do it

***************/

 

/** ************

** \brief But it does see this one with the space in there

***************/

 

Note the space after the second * in the second example.

 

HTH; YMMV.

-Brian

 

From: MURESIANU Philippe [mailto:[hidden email]]
Sent: Friday, July 08, 2016 4:47 AM
To: Albert <[hidden email]>
Cc: [hidden email]
Subject: Re: [Doxygen-users] documenting C structure

 

Hi Albert,

 

Here is an example of the code and doxygen comments:

 

If I do the way below, ‘S_MyStruct’ is not found by Doxygen:

 

mySource.c:

 

/****************

\struct S_MyStruct

\brief  blablabla

****************/

typedef struct {

unsigned short  W_len;

unsigned char    B_nb;

unsigned char    Ba_Buf[10];

} S_MyStruct;

 

/****************

\brief  it’s my function that uses \ref S_MyStruct

****************/

void myFunction()

{

}

 

Doxygen reports in warnings.txt:

mySource.c: 50: warning: unable to resolve reference to ‘S_MyStruct’ for \ref command

 

 

BUT, if I put the structure declaration in “mySource.h”, ‘S_MyStruct’ is found by Doxygen.

 

Doxygen version: 1.8.9.1

 

Thanks.

 

Regards,

 

Philippe

 

 

 

De : Albert [[hidden email]]
Envoyé : jeudi 7 juillet 2016 19:26
À : MURESIANU Philippe
Cc : [hidden email]
Objet : Re: [Doxygen-users] documenting C structure

 

Please add some code and the version of doxygen you used, so we can see what you tried and it is easier to give an advise.

Albert

 

On Thu, Jul 7, 2016 at 11:33 AM, MURESIANU Philippe <[hidden email]> wrote:

Hi,

 

When I declare a structure in my .c source file, the reference of the structure is not found by Doxygen.

If I declare it in my header file (for test purpose), Doxygen finds the reference.

I declare my structure in .c source on purpose and I can’t declare it in the header file.

How can I fix my issue and make Doxygen finds the reference of this structure ?

 

Thanks.

 

Regards,

 

Philippe


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users

 


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users