4

I have two C++ projects A and B; The dependency is only B to A.

B  --> A

I would like to separately run Doxygen on A and B respectively but still let me possible cross reference on A from B doc. (That is, when I browse B doc, I can directly link to the A doc if there is any Class from A used in B).

--

[Replied the answer from 0x4b:] if I set "CREATE_SUBDIRS" with YES and use relative path for tag files, Doxygen will somehow make wrong linking reference.

I did follow the example.

 <root>
    +- proj
    |   +- html               HTML output directory for proj   
    |       +- d1
    |       |   +- d2
    |       |       .... (*.html)
    |       | 
    |         ...(*.html)
    |   +- src                sources for proj
    +- ext1
    |   +- html               HTML output directory for ext1
    |   |- ext1.tag           tag file for ext1
    |- proj.cfg               doxygen configuration file for proj
    |- ext1.cfg               doxygen configuration file for ext1

proj.cfg:
OUTPUT_DIRECTORY  = proj
INPUT             = proj/src
TAGFILES          = ext1/ext1.tag=../../ext1/html

ext1.cfg:
OUTPUT_DIRECTORY  = ext1
GENERATE_TAGFILE  = ext1/ext1.tag 

The documents under both html/ and html/d1/d2 would like to try linking external doc located in ../../ext1/html. Apparently one of them will fail.

1 Answer 1

5

You probably want to use the tagfile feature. When you generate the documentation for A, make sure the GENERATE_TAGFILE option is set. When you generate the documentation for B, set the value of TAGFILES to include the result from A.

[Update to address relative paths]

Doxygen is fairly fragile when it comes to [relative] paths. You clearly understand that using an absolute path will solve the problem. You could try taking a value from the environment, e.g. using

TAGFILES          = ext1/ext1.tag=$(PWD)/../ext1/html

to create an absolute path. It's not ideal, but a lot of the values in the Doxyfile depend on where doxygen is run, and not where the configuration file lives.

1
  • replied in the original post.
    – rnd_nr_gen
    Nov 30, 2010 at 10:25

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.