Geoff Worboys writes:
Sam Varshavchik wrote: > However, I have a reproducible test case that demonstrates > this, using a pair of minimal doxyfiles.> Running doxygen in the proj1 subdirectory creates a tagfile > for one header file. Then, running doxygen in the proj2 > subdirectory issues the strange warning for <unknown>:1, > referencing the sole method in the header file (amidst the > verbosity out of the default, loud, Doxyfile): > [mrsam@monster proj]$ cat proj1/Doxyfile > FILE_PATTERNS = *.H > GENERATE_TAGFILE = tagfile.tag > [mrsam@monster proj]$ cat proj1/vector.H > //! Template class > template<typename T> > class vector { > public: > //! Member > void load() { } > }; > [mrsam@monster proj]$ cat proj2/Doxyfile > FILE_PATTERNS = *.H > TAGFILES = ../proj1/tagfile.tag=../proj1 > [mrsam@monster proj]$ cat proj2/user.H > #include "../proj1/vector.H" > //! Derived > class derived : public vector<int> { > }; The obvious follow on question from this is whether the problem is specific to templates? Did you try it with class vector as a simple class rather than a template?
Templates and ordinary classes have different semantics, and are not really replacements for each other. Making the inheritance a regular class, of course, makes this ordinary inheritance, which has no issues.
>From a C++ perspective vector<int> may indeed not exist inside proj1 (depending on explicit instantiation). Of course the same logic should not apply to doxygen, but it would be curious to know if it might be following that in some way - and the simpler the example you can report to the bug list the easier it will be for analysis.
Well, that's as much as I can pare down. Can't really get any more bare than two headers, with one class or template declared in each, and a pair of Doxyfiles containining only two non-default settings.
One other thing to check is the quotes around the include. I doubt if doxygen treats them differently, but the general rule (as I understand it) is that external headers would be included using using: #include <..proj1/vector.H> Another interesting question might be what you have for the INCLUDE_PATH in your doxyfile. You'll see why I ask that question in my next post - which you've just reminded me I was going to make to the list.
I don't have anything for the include path. The external headers are in /usr/include.
For the simple test case, replacing the include with #include <proj1/vector.H> and then adding the INCLUDE_PATH so that the external header can be found, that makes no difference. The warning still gets issued.
What does make the warning go away is leaving the template declaration as is, but replacing the inheritance with 'class derived : public vector'. That makes the warning go away, but, of course, that's invalid C++. vector is a template.
What is interesting is that just replacing the contents of user.H with //! Derived class derived { //! Derived vector<int> X; };Does not warn. Neither does getting rid of the class declaration entirely, and putting only
//! Derived vector<int> X;This doesn't warn either. The only situation where the warning gets emitted is "class derived: public vector<int>".
So, basically, the problem looks like: 1) One project declaring a template class, and exporting it into a tagfile2) A second project importing a tagfile, and declaring a class that derives from a template that was declared in the first project.
pgpZx9im5U4Hy.pgp
Description: PGP signature
------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________ Doxygen-users mailing list Doxygen-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/doxygen-users