2

I want to use doxygen and sphinx to generate documents for source file, in the rst file, I use "doxygenfile" to introduce the source file, like

.. doxygenfile:: Headerfile1.hpp
   :project: MyProject

.. doxygenfile:: Headerfile2.hpp
   :project: MyProject

As the classes in the two headerfile is defined in the same namespace, so they both have a same namespace delcare:

namespace Namespace_xxx
{
   ...
   definitions ...
   ...
}

When build, a warning is reported like:

WARNING: Duplicate C++ declaration, also defined at XXX :17. Declaration is '.. cpp:type:: Namespace_xxx'.

And the same situation for python file, a warning like: WARNING: duplicate object description of <module_name>, when I import submodule from the same module in different .py and introduce them to the rst by "doxygen".

Why sphinx recognize reference of namespace or module as duplicated declaration? How to fix this problem?

I tried to use :noindex: true option, but it reported that "noindex" is not a valid option for "doxygenfile" when build

mzjn
  • 48,958
  • 13
  • 128
  • 248
xiaojuan
  • 21
  • 1

0 Answers0