Any ideas why doxygen can't resolve these links?

1,233 views
Skip to first unread message

Corey Taylor

unread,
Jan 9, 2011, 12:48:27 AM1/9/11
to g3d-developers
C:/dev/G3D/G3D9/doc-files/api-index.dox:155: warning: unable to resolve link to `G3D::getOpenGLState' for \link command
C:/dev/G3D/G3D9/doc-files/api-index.dox:197: warning: unable to resolve link to `G3D::Point2int16' for \link command
C:/dev/G3D/G3D9/doc-files/api-index.dox:198: warning: unable to resolve link to `G3D::Point2int32' for \link command
C:/dev/G3D/G3D9/doc-files/api-index.dox:200: warning: unable to resolve link to `G3D::Point3int16' for \link command
C:/dev/G3D/G3D9/doc-files/api-index.dox:201: warning: unable to resolve link to `G3D::Point3int32' for \link command
I currently have no idea why these won't resolve.  Point2 and Point3 resolve correctly.
 
I thought it had to do with the packing macro, but if i move that macro before the class comment/brief, it doesn't change anything.
 
corey

Morgan McGuire

unread,
Jan 9, 2011, 11:55:49 AM1/9/11
to g3d-dev...@googlegroups.com
That is really weird. It seems to get the other functions and
typedefs. Are you sure I didn't accidentally put those things outside
the G3D namespace?

We can force it with /** \def Point2int16 \copydoc Vector2int16 */,
although I'm not sure that works for whole-class documentation.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Corey Taylor

unread,
Jan 9, 2011, 4:01:46 PM1/9/11
to g3d-dev...@googlegroups.com
I checked the namespaces when I was trying to the links.  I couldn't find anything incorrect.

I don't think copydoc would work.  However, we could create a typedoc doc that points to Vector2int16.

The packing macro that wraps Vector2int16 must be the cause of this somehow still.  I remember looking into a couple similar issues years ago, but can't remember the resolution.

corey

Corey Taylor

unread,
Jan 9, 2011, 11:48:45 PM1/9/11
to g3d-dev...@googlegroups.com
Found it (at least for the Point* links.  Not sure about getOpenGLState() yet).
 
#ifdef _MSC_VER
#    define G3D_END_PACKED_CLASS(byteAlign)  ; PRAGMA( pack(pop) )
#elif defined(__GNUC__)
#    define G3D_END_PACKED_CLASS(byteAlign)  __attribute((aligned(byteAlign))) ;
#else
#    define G3D_END_PACKED_CLASS(byteAlign)  ;
#endif
 
Doxygen must not be recognizing the end of the class before it gets to the Point* typedef which must be somehow causing an unresolved link.
 
Don't see it?  Notice the ; is part of the macro.
 
corey

 

Corey Taylor

unread,
Jan 9, 2011, 11:55:43 PM1/9/11
to g3d-dev...@googlegroups.com
Also, I believe you want to use the packed attribute there as well.
 
corey

Morgan McGuire

unread,
Jan 10, 2011, 12:02:51 PM1/10/11
to g3d-dev...@googlegroups.com
Yes, the semi-colon has to be there because of the way that gcc does
the syntax. We could either put an extra semi-colon in the source
code to make Doxygen happier, or could force doxygen to run with
MSC_VER or something defined so that it knows which branch to take on
the #ifdef.

What do you mean by "you want to use the packed attribute there as well."

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Corey Taylor

unread,
Jan 10, 2011, 3:50:15 PM1/10/11
to g3d-dev...@googlegroups.com
On Mon, Jan 10, 2011 at 12:02 PM, Morgan McGuire <mor...@cs.williams.edu> wrote:
Yes, the semi-colon has to be there because of the way that gcc does
the syntax.  We could either put an extra semi-colon in the source
code to make Doxygen happier, or could force doxygen to run with
MSC_VER or something defined so that it knows which branch to take on
the #ifdef.

What do you mean by "you want to use the packed attribute there as well."
 
It depends on what you're trying to accomplish with the packed macro.  It looked like you were trying to pack the members not change the alignment of variables of that type.
 
corey

Morgan McGuire

unread,
Jan 10, 2011, 5:59:16 PM1/10/11
to g3d-dev...@googlegroups.com
Right. Does my code not do that?!

-m

Corey Taylor

unread,
Jan 10, 2011, 6:35:02 PM1/10/11
to g3d-dev...@googlegroups.com
Your code change the alignment of any variable of that type.  If you created an array of that type, you're changing the alignment of each element.
 
corey

Morgan McGuire

unread,
Jan 10, 2011, 8:18:52 PM1/10/11
to g3d-dev...@googlegroups.com
Oh, that's bad. I should be putting __attribute__ ((packed) on each
field, right?

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Corey Taylor

unread,
Jan 10, 2011, 8:31:31 PM1/10/11
to g3d-dev...@googlegroups.com
I believe for what you want, you would put the attribute on the class itself:


corey

Morgan McGuire

unread,
Jan 11, 2011, 10:09:27 PM1/11/11
to g3d-dev...@googlegroups.com
Thanks a lot. This should be fixed now.

-m

Corey Taylor

unread,
Jan 11, 2011, 11:12:16 PM1/11/11
to g3d-dev...@googlegroups.com
The MACRO_EXPANSION setting in Doxyfile is set to true so the macros should be auto-expanded.
 
I'm not sure why the class declaration isn't being parsed properly.  Well, if nothing else, a couple rarely used classes won't have the same documentation as the other typedef's.
 
corey

Corey Taylor

unread,
Jan 11, 2011, 11:28:06 PM1/11/11
to g3d-dev...@googlegroups.com
Do you think you still need to set the class alignment now that it's packed properly?
 
G3D_END_PACKED_CLASS(byteAlign)  __attribute((aligned(byteAlign))) ;
 
Without that, we wouldn't need to define the macro with a ;
 
corey

Morgan McGuire

unread,
Jan 11, 2011, 11:37:56 PM1/11/11
to g3d-dev...@googlegroups.com
Yes, otherwise you won't get the expected behavior if you make an array of them.

-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

On Tue, Jan 11, 2011 at 11:28 PM, Corey Taylor

Corey Taylor

unread,
Jan 11, 2011, 11:40:57 PM1/11/11
to g3d-dev...@googlegroups.com
I'll see what I can do with the Doxyfile settings.
 
I've got a number of documentation and link fixes going in.
 
I collapsed a number of separate links in topic-api dealing with the old file helpers down to FileSystem.  Maybe there's more we can do with that later, but that class' documentation has everything you need.
 
corey

Reply all
Reply to author
Forward
0 new messages