Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 836373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:58:16+00:00 2026-05-15T04:58:16+00:00

I’m working on a project that uses multiple libraries, set up in a structure

  • 0

I’m working on a project that uses multiple libraries, set up in a structure like so:

/src
/libs/libOne
/libs/libTwo

I want to generate a single Doxygen page which covers all my code as well as the libraries. This was quite simple by just pointing Doxygen at the root. However, I want the doxygen output to be grouped so I can clearly see which library each class/file belongs to. However, since the libraries are not written by me I don’t want to change them to add \addtogroup comments.

I don’t mind if the produced documentation is subpar for the libraries (for example if they don’t include doxy compatible comments), I still want them included so I can view call graphs, and quickly browse the classes, etc.

How can I group each libraries code into modules without changing the libraries’ source?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:58:17+00:00Added an answer on May 15, 2026 at 4:58 am

    You should put all the necessary documentation in external files. I didn’t know how to do this, but I’ve tried to set up a minimal environment like yours and it worked well. Just for documenting something I’ve grabbed the example code on the Doxygen site:

    test1.h:

    #define MAX(a,b) (((a)>(b))?(a):(b))
    typedef unsigned int UINT32;
    int errno;
    int open(const char *,int);
    int close(int);
    size_t write(int,const char *, size_t);
    int read(int,char *,size_t);
    

    and wrote the totally useless test2.h (just to have two different files…):

    void itdoesnothing();
    

    Here comes the nice part. I’ve made an external header just for documenting the above, called it test_doc.h (again, just used the example on the Doxygen site):

    /*! \addtogroup everything The main group
        This group contains everything.
        @{
    */
    
    /*! \file test.h
        \brief A Documented file.
    
        Details.
    */
    
    /*! \def MAX(a,b)
        \brief A macro that returns the maximum of \a a and \a b.
        Details.
    */
    
    /*! \var typedef unsigned int UINT32
        \brief A type definition for a .
        Details.
    */
    
    /*! \addtogroup err Error handling
    Error handling related stuff
    @{
    */
    
    /*! \var int errno
        \brief Contains the last error code.
        \warning Not thread safe!
    */
    
    /*! @} */
    
    /*! \addtogroup fdrelated File description related
        File descriptor related stuff.
        @{  
    */  
    
    /*! \fn int open(const char *pathname,int flags)
        \brief Opens a file descriptor.
    
        \param pathname The name of the descriptor.
        \param flags Opening flags.
    */
    
    /*! \fn int close(int fd)
        \brief Closes the file descriptor \a fd.
    
        \param fd The descriptor to close.
    */
    

    This successfully documented both files for Doxygen. This way you can group files, namespaces etc. too, as stated in the manual:

    Members of a group can be files, namespaces, classes, functions, variables, enums, typedefs, and defines, but also other groups.

    So try reading http://www.doxygen.nl/grouping.html too and see what’s possible to do with the things I’ve mentioned above. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 450k
  • Answers 450k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Do it in a while() loop instead, and break when… May 15, 2026 at 8:36 pm
  • Editorial Team
    Editorial Team added an answer You can use psql, a command line tool which may… May 15, 2026 at 8:36 pm
  • Editorial Team
    Editorial Team added an answer You can do it - or at least something very… May 15, 2026 at 8:36 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.