How to use doxygen on Mac?
Jul 1, 2022
UML(Unified Modeling Language) is a good way to navigate object-oriented programing. How can we construct it directly from a terminal?
Pre-requesite:
- mac/terminal
- brew install graphviz;
- brew install doxygen
- (if you want pdfs) I tried miktex, however, there are some system issues. So I also tried the full mactex(~5GB): https://www.tug.org/mactex/mactex-download.html
Let’s start the doxygen:
check what’s in the directory:
>ls
main.cpp
- >doxygen -g ; # this will generate a Doxyfile
modify the Doxyfile such that:
HAVE_DOT = YES , UML_LOOK = YES, EXTRACT_ALL = YES, EXTRACT_PRIVATE = YES
2. next:
>doxygen; # start to compile → generate ./html and ./latex two folders.
cd latex ; make>ls # check again:
Doxyfile html latex main.cpp
3. >open html/index.html or you can exlore the latex folder for generated pdfs; classes → Class Hierarchy. click into individual object we can get the following: