0

I'm writing a C/C++ program. The tree structure of the program looks like below:

Program
   |---- lib1
     |----src
     |----include
   |---- lib2
     |----src
     |----include
   |---- app1
     |----main.cpp
   |---- app2
     |----main.cpp

App1 and app2 are two applications that use lib1 and lib2.

I have already documented the header files in lib1 and lib2. However, I would also like to document app1 and app2, because these two applications are command line tools that take a bunch of parameters and do some stuff. What would be a proper way of doing this?

Thank you

4
  • 1
    Is there a reason why the technique you used to document lib1 and lib2 could not be used for app1 and app2. Doxygen comments works fine in .cpp files if Doxygen sees the files. stackoverflow.com/questions/18976509/… Commented Sep 19, 2017 at 15:37
  • Thank you for your quick response. Honestly, I'm pretty new to Doxygen. I'm using the same technique, but I think I might be doing something wrong. I have specified \class \brief and some other parameters at the top of lib include files. It shows up fine in the document. Commented Sep 19, 2017 at 15:39
  • @DaleWilson But do I need to specify \class in the app1 source file in order to make it show up? It does not make sense because it is not a class..... Commented Sep 19, 2017 at 15:40
  • Correct. If it is not a class, don't use the \class tag. Use \brief, or some other tag as appropriate. Commented Sep 19, 2017 at 16:01

2 Answers 2

2

Thanks to Dale Wilson's help, I find the correct tag to set.

EXTRACT_ALL = YES

After setting this to YES, source files will show up.

Sign up to request clarification or add additional context in comments.

1 Comment

probably should mark this as the answer for the question.
1

Make sure Doxygen examines cpp files by specifying them in the Doxygen config file or by using the doxygen wizard. Click here for more details about that.

Then add Doxygen comments to the cpp files. This page in the online Doxygen documentation provides information tells you about documenting C-style languages.

1 Comment

Thank you. So I have added app1 to the input tag, and the *.cpp* is also included in the FILE_PATTERNS` tag. I'm pretty sure that doxygen finds it, because I see this output log Preprocessing /Users/wuh20/github/CAnalogsV2/app_data_manager/main.cpp... Parsing file /Users/wuh20/github/CAnalogsV2/app_data_manager/main.cpp... But still in the HTML I only see three tabs, main pate, classes, and files. And under files, the main.cpp is not included. Am I looking for the wrong place?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.