7

I need to generate documentation for a C++ project of mine (and soon perhaps also for additional ones). So far I've looked into doxygen, and even though it seems popular, I've had some issues with it (the details of which I won't go into here; some have been resolved). Since I'm not particularly attached to it - despite its apparent popularity - I want to consider some alternatives.

Now, 7 years ago there was a question on StackOverflow on exactly that:

Doxygen Alternatives for C++

but the answers are by now dated, so I'm reasking the same question, here and now.

Requirements:

  • Libre
  • Gratis
  • Multiplatform, supporting at least Linux and Windows
  • Flexible to a similar level as doxygen or more
  • Actively maintained
  • Non-negligible user base
  • 1
    If you "won't go into the details here", then it's going to be difficult to help you – Mawg Mar 30 '17 at 10:25
  • @Mawg: It was mostly this, but that won't help you much I think... – einpoklum - reinstate Monica Mar 30 '17 at 12:44
  • But that got solved. So why not use DoxyGen? Just curious – Mawg Mar 30 '17 at 12:57
  • @Mawg: The fact that it behaved that way gave me a hunch I might want something else. Also, why should I use doxygen, other than I've heard of it? It's not like a I have positive experience with it. – einpoklum - reinstate Monica Mar 30 '17 at 13:06
  • Why not at least give it a try? There are a lot of people out there who are positive about it. They can’t all be wrong. Plus, it has been actively maintained and developed for many tears, and Dimitri is very helpful Since the home page starts “Doxygen is the de facto standard tool for generating documentation from annotated C++ sources”, surely it is worth a try. And, that it continues “but it also supports other popular programming languages is a big plus point for me. – Mawg Mar 31 '17 at 7:30
7

Personally I would strongly recommend taking a look at Sphinx-Doc which was written for the Python documentation but is applicable to other systems as well.

  • Produces great looking documents with multiple themes in multiple formats
  • Can generate from multiple programming language, e.g. C++ with the C++ domain
  • Can be integrated with build systems including make, Jenkins, etc.

Addressing your points:

  • Libre Fully Open Source
  • Gratis Yes
  • Multiplatform, supporting at least Linux and Windows Yes Python based so runs just about anywhere Multi-platform Installation Instructions
  • Flexible to a similar level as doxygen or more Yes Personally I find it more flexible as it allows a mixture of auto-generated and pre-written, in ReStructuredText, documentation.
  • Actively maintained Yes At the time of writing rev 1.5.3 was released 2017-02-26 just over a month ago
  • Non-negligible user base Yes - Read The Docs supports it to start with & lots of examples here

Note that for Automatically generating nice looking documentation from C/C++ source code you can combine Sphinx for the document generation with doxyGen for information extraction to XML and breathe acting as a bridge between them.

  • 1
    Sphinx does not support autogenerated docs for C or C++. That is, you need to maintain your entire API and documentation in ReST files parallel to your code. Big risk for typos, things to get out of sync, etc. – detly Dec 13 '17 at 6:50
  • @detly Added information on the breathe extension that allows auto-generation via doxygen from the code. – Steve Barnes Dec 13 '17 at 10:20
  • 1
    Thanks for that, I'd seen breathe mentioned elsewhere but misunderstood what role it played here. After doing a bit more research it seems there's also some LLVM Clang based autogen plugins for Sphinx that are in development but might eventually fill that gap too. – detly Dec 13 '17 at 21:47
2

(I've salvaged several answers from the now-deleted StackOverflow question page:)

Doc++

You could try DOC++ but it may be even uglier.

cldoc

There is an open source alternative to doxygen out there called cldoc.

It can handle both C and C++ and is based on clang. The most interesting features it claims to offer:

  • Uses clang to robustly parse even the most complex C++ projects without additional effort from the user.
  • Uses markdown for documentation formatting.
  • Uses a simple format for documenting your code.
  • Supports cross-referencing in documentation.
  • Generates a single file, javascript based web application to render the documentation.
  • Lightning fast client-side searching using a pregenerated search index.

NaturalDocs

My weapon of choice is NaturalDocs. It has its warts but the output is decent and the markup is effortless.

NetBeans

If your interested in tracing big project, then I would suggest c++ version of Netbeans which can dynamically generate nice call graphs ( look for 'Show Call Graph' feature ).

Doxypress

DoxyPress is a modern replacement for Doxygen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.