Launch Doxygen from [doxygen] – [Doxywizard]. [Doxygen GUI Frontend] dialog opens, select [Wizard] – [Project] and specify the items as below.
Enter the project name
Project version or id
Enter Project version or ID
Source code directly
Specify the source code directory
Check if you want to scan recursively including the sub folders.
Do not use the following symbols &, <, >, * or @.
Now move to [Wizard] – [Mode] and check two options like the figure below.
Next configure [Wizard] – [Output], and check [XML].
Go to [Expert] – [Input] and specify the encoding which is used in the source code (e.g. UTF-8, CP1252). List of supported encoding.
Still in [Expert] – [Preprocessor] and make sure to check the three options, [Enable_Preprocessing], [Macro_Expansion] and [Search_includes], rest can be your preference.
Finally, go to [File] – [Save] to save all the configurations you made, and go back to [Doxygen GUI frontend] dialog, select [Run] tab. Specify the working directory and then click [Run doxygen] button. If Doxygen finished converting without any errors, you will see the message “Doxygen has finished” in the window.
In Astah, create a new file or open an existing file. Then go to [Tools] – [C++] – [Import C++] and start loading the XML file.
To create a class diagram with the imported source code, right-click on a package and generate a Class Diagram automatically.
When import fails
Make sure that you set the correct encode in Doxygen. Please follow the step below to re-generate the .xml file.
Check which encoding is used in the C++ source code.
All source code files need to be using the same encoding.
Launch Doxygen. Go back to Step.3 to configure the setting.