Documentation not appearing in doxygen output - doxygen

I'm trying to document a C API which is all contained in a single C Header file. When I run doxygen, on the file, it's giving me errors for currently undocumented C Macros, but when I add the necessary documentation for macros, although the undocumented errors are cleared, the macros plus documentation do not appear in the doxygen generated html output.
Only a fraction of the documented header file, the structures, actually appears in any doxygen output. I can't see anything in configuration settings or documentation that would assist in clarifying why doxygen does not place documented code from the header file into its generated output.
Does anybody know why this would be the case?

See items 2 and 3 of the FAQ: http://www.doxygen.org/manual/faq.html
In short you are likely missing a comment block with #file to document your header file.

Related

Cond statement doxygen does not work

I am trying to separate out internal and external documentation using the doxygen constructs of cond; but i just cant seem to get get it working. I would essentially like to exclude some files completely and not conditionally. Regardless of where i add the tag (before include, before header guards etc) , the files and source both show up.
What i have tried in vain is to take the test file from doxegen repo for
conditional test and add it to the project.
Steps to reproduce [Linux]
create a new directory.
copy paste the above file (had to rename it to .h as .c was passed over?).
generate dummy config via doxygen -g.
update Doxyfile ENABLED_SECTION = COND_ENABLED.
Run doxygen.
check html/index.html
This however is still visible in the html documentation it generates for the project. I have set the ENABLED_SECTION variable with other values , but cond_enabled function still shows up. Running the testing directory of the project (doxygen) it passes. So i am lost.
Any suggestions?
Tried with latest version 1.8.14.
Thanks!
Regarding the \cond problems (not an answer directly to the real problem you face, I think, but to long for a comment).
The mentioned file is used in the, limited, testing doxygen can do / does and the first lines contain some instructions on what to do. Furthermore there is a default Doxyfile with the tests in use. It is hard to run a separate test outside the doxygen build tree.
Regarding the remark "Running the testing directory of the project (doxygen) it passes." This is correct, here, at the moment, only testing is done against the XML output and the generated output is compared to a once created version of the XML output. No tests are done, at the moment, in respect to HTML or PDF / LaTeX. Recently the test framework has been slightly extended so in the future this should be possible (compare the xhtml and tex output, but some work has still to be done here).
The version of the parser sees the \cond in the first line (normal C comment) as a doxygen command and skips everything till the first \endcond (your friend in these cases is always doxygen -d preprocessor). I think that removing / modifying the first line will result in an already better result. There is however another hiccup for e.g. HTML output. As the function cond_enabled is not documented and EXPAND_ALL is not set to YES the function will not appear in the documentation. So best is also to add a line of documentation with the function cond_enabled.
Regarding the seen HTML problems I modified the the relevant test in doxygen slightly and pushed a proposed patch to github (pull request 714, https://github.com/doxygen/doxygen/pull/714).
Note: the problem of skipping the \cond in normal C comment is quite a bit harder to implement (seen the logical complexity of the doxygen code in pre.l and commentcnv.l.
EDIT: 2018/06/10: The push request has been integrated in the master version on github.

Indicate language for doxygen \include

I am trying to include a .ini file in the doxygen documentation of a C++ class, using \include. This works fine, but for some reason, doxygen treats the contents of the file as C code, which leads to strange formatting. I know \include surrounds the included file with a \code block, and that you can pass specific language information to the code block by using e.g. \code{.unparsed}. Is there a way to do the same with \include? \include{.unparsed} does not work...
Seems the answer to the question is "no": you cannot indicate a language when using \include, since doxygen tries to determine the language based on the extension. If it fails to do so, it reverts to C. If you do not want C formatting for unsupported file extensions, you can use \verbinclude instead of \include.

Include *prewritten* documentation in Doxygen

To distinguish this question from Doxygen: Adding a custom link under the "Related Pages" section which has an accepted answer that is not a real answer to the question, I specifically add prewritten to the question.
What I want:
Write one document tex file (without preamble, since this file will be \input-ed into a full document)
Import the document into Doxygen's HTML output.
Using Doxygen to produce tex file will probably not work, since it does too much layout work [This holds for its HTML output too like empty table rows 2015]. If Doxygen takes some other input that can easily be transformed into LaTeX, that will do.
You can easily add an already existing Latex file to your doxygen documentation using \latexonly\input{yourfile}\endlatexonly.
I would assume you put it e.g. under a doxygen \page.

Doxygen does not process my source file comments

I'm new with Doxygen, and i have been commenting my functions with the Qt style approach:
/*! .. */
Doxygen however only picks up my header files and does not generate documentation of any text that is within these comments.
The html file rendered, shows a completely empty main page, "Classes' only list the structs
that are found in the header files and "Files" lists only the same header files in the project.
What may cause this behavior, or is this to be expected?
Am i missing something? The only thing i changed in the configuration file was the INPUT directory to be "src".
No errors during compilation, i see that it is preprocessing and parsing my .c files. And at some point it says this, but only for the header files
Generating code for file src/foo.h...
Generating code for file src/bar.h...
etc.
Finally i get some warnings about structs not being documented, but nothing about the functions I want to have actually documented.

Doxygen \cite producing empty bibliography

I'm trying to use \cite in Doxygen to produce a bibliography page and also a reference within my text. I have bibtex in my search path and a proper .bib file. I have added the .bib file to CITE_BIB_FILES and am using a proper BibTex label found in the .bib file. Doxygen is creating a bibliography page, but it is empty. It is also creating a citation link in the documentation text, but the link is also empty. Any idea how I can get the citation info displayed?
I was facing the same problem. There is an perl dependency to generate citation. So you must have both perl and bibtex in the system path.
Ignore the example above, that only applies to Latex, for doxygen use (Note: no braces):
\cite Hale
The .bib file has to be located in doxygen working directory.
Bibliographic References HTML page will be then produced by doxygen with:
[1]J. K. Hale. Theory of functional–differential equations. Springer–Verlag, Berlin–Heidelberg–New York, 1977.
for the following bib entry:
#BOOK{Hale,
author = "J. K. Hale",
title = "Theory of functional--differential equations",
publisher = "Springer--Verlag, Berlin--Heidelberg--New York",
year = 1977
}
In order for \cite to work properly you need:
be sure to put your file.bib in the working directory where you call doxygen Doxyfile
bibtex executable must be in the search path
perl executable must be in the search path
the RefName used in \cite RefName must have a corresponding entry in file.bib
Maybe a little late, but I had the same problem. Doxygen generated a bibliography for LaTeX output, but not for HTML output and none of the proposed answers worked for me.
As suggested by #Raffi, this seems to be a bug in Doxygen < 1.8.3. I used Doxygen 1.8.1.1 and it did not work. Then I installed Doxygen 1.8.3.1 without changing anything else and it worked fine.
When you set CITE_BIB_FILES in DoxyFile did you include the .bib extension on the filename?
Doxygen claims it will automatically add the .bib extension, but if you omit it doxygen seems to gets confused and doesn't generate the citelist.doc file properly.
Include .bib in the filename and it should work fine, at least that is the case for me.
In order to create a bibliography you need to instal Perl, and add it to the search path, along with bibtex. In the documentation
for CITE_BIB_FILES it says:
"The CITE_BIB_FILES ... To use this feature you need bibtex and perl available in the search path ... "