I am aware of this post. However:

  • I can use either Linux or Windows, not just Windows (vastly increasing overall options)
  • That post is ancient and tools have come and gone since then
  • I have tried those mentioned and am looking for alternatives

What tools are available for creating UML Class Diagrams from a set of .h or .cpp files?

I am looking for something that...

  • Is free
  • Runs out of the box on Windows OR Linux
  • Either does not require an IDE, or works with QTCreator (which my project is based on)
  • Has a GUI
  • At least gets the attributes and methods. If it can't get the complicated parts, that's fine.
  • At least runs with "impure" C++ (Has macros and other pre-processor steps)

Here is what I have tried so far:

  • StarUML: While it has an addon that performs reverse engineering, the results were mediocre. I think it may have been broken. Every class was named "Class" in the sidebar. The "overview" for the module I was interested in was several boxes, with the name of an enumeration or class. They were otherwise empty, and several were missing.

  • QTCreator offers modeling. I can create a new model and drag a .h file into it, but the results is just an empty class - attributes and methods did not carry over.

  • Dia with cpp2dia - I cannot get this to work. Definitely doesn't work "out of the box", requires some configuration that I cannot follow.

  • BoUML - Won't work, the C++ has pre-processor directives.

  • Doxygraph: Only works if the entire code-base is covered by Doxygen properly, as far as I can tell. This project is not.

  • Modelio: Can't install, relies on some old packages that Fedora 29 no longer supports.

  • Umbrello: Looked promising, crashed when I attempted to do the import of the module I wanted the diagrams of.

  • Visual Paradigm doesn't work if there are macros...unless you define every single macro for it in advance. There's too many to do by hand in this code, not feasible.

Things I may try as a last resort:

  • WhiteStarUML: I already tried StarUML.

  • ArgoUML: Can't figure out how to install this addon or fork of ArgoUML that has reverse-engineering for C++ here. Looks fairly dead, given 12 years with no update.

  • I don't know DoxyGraph, but maybe you can set there in the doxygen configuration file (Doxyfile) the settings EXTRACT_ALL, EXTRAC_STATIC etc. to YES to get a full / better coverage.
    – albert
    Commented Dec 2, 2019 at 12:09

2 Answers 2


I am a big fan of SAP Powerdesigner which runs on Windows.

It is commercial and expensive. But there still is a one-month trial license. Powerdesigner is a database reverse-engineering tool, but it has a so-called "Object-Oriented Modeling" Module which can reverse-engineer Java Code, and to a limited extent C++ code.

Powerdesigner's main strength lies on relational databases, and, therefore, on building classes for Object-Relational Mappers mainly in Java (but C++ as a target language is also offered).

But Powerdesigner has good programmability features, and you could write your own importers and finetune the built-in C++ metamodel. That's quite a bit of work to learn the built-in DSL and scripting engine, but you might give it a try.

I don't know how well the C++ reverse engineering feature works with C++ macros.

SAP has acquired Sybase in 2011, and since then the product has been even more paywalled and somewhat orphaned. It is still being sold but I think the devteam is quite small.

Here is a screenshot but right now I am not able to show you rev eng GUI/capabilities in a screenshot.

enter image description here


This is the best UML tool I found so far (for C++/Java development): SourceTrail. It is like Doxygen, but it is dynamic and it does not need to recompile everything when something changes. If it had editing capabilities, it would be my favourite IDE.

However, it is a reverse engineering tool, and it does not allow to modify the diagrams, just view/navigate them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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