GNOME Bugzilla – Bug 644115
Links to C symbols from tagfiles fail
Last modified: 2011-03-30 16:16:20 UTC
Created attachment 182697 [details] [review] Patch enabling automatic link targets from taglists I have a C project with multiple Doxygen projects and tagfiles linking each other (http://gitorious.org/sofia-sip/sofia-sip). Creating autolinks or explicit refs to C stuff, like functions, typedefs or macros between projects does not work. The refs to sections etc. work nice. The taglist links has been broken quite some time now (from some 1.3.* onwards). If my memory serves me right, I promised Dimitri to provide a patch at that time. I've now digged the cause and it seems to me that the findMembersWithSpecificName() in util.cpp has checks for FileDef or GroupDef linkability, which fail if the target is read from the a tagfile. I guess that is because the taglist just gives link directly to the documentation. If I simply remove the check, the refs and links work. I have no idea if this breaks something else. --- doxygen-1.7.1-orig/src/util.cpp 2010-06-23 14:25:36.000000000 +0300 +++ doxygen-1.7.1/src/util.cpp 2011-03-04 22:18:33.507235996 +0200 @@ -3656,18 +3656,18 @@ bool checkCV, QList<MemberDef> &members) { - //printf(" Function with global scope name `%s' args=`%s'\n", - // mn->memberName(),args); + ///printf(" Function with global scope name `%s' args=`%s'\n", + // mn->memberName(),args); MemberListIterator mli(*mn); MemberDef *md; for (mli.toFirst();(md=mli.current());++mli) { FileDef *fd=md->getFileDef(); - GroupDef *gd=md->getGroupDef(); + //GroupDef *gd=md->getGroupDef(); //printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p current=%p\n", - // md->name().data(),args,fd,gd,currentFile); - if ( - ((gd && gd->isLinkable()) || (fd && fd->isLinkable())) && + // md->name().data(),args,fd,gd,currentFile); + if (/* + ((gd && gd->isLinkable()) || (fd && fd->isLinkable())) && */ md->getNamespaceDef()==0 && md->isLinkable() && (!checkStatics || (!md->isStatic() && !md->isDefine()) || currentFile==0 || fd==currentFile) // statics must appear in the same file Here is a sample page generated with plain doxygen (looks like slightly older one than 1.7.1): http://sofia-sip.sourceforge.net/refdocs/nua/nua__api__overview.html and here with patched one: http://sofia-sip.org/~ppessi/1.12.10pre11rc1/nua/nua_api_overview.html
*** This bug has been marked as a duplicate of bug 635537 ***