이미 존재하는 doxygen 문서를 상호 참조하는 방법은 무엇입니까? (How to cross-reference already existing doxygen docs?)


문제 설명

이미 존재하는 doxygen 문서를 상호 참조하는 방법은 무엇입니까? (How to cross‑reference already existing doxygen docs?)

두 개의 C++ 프로젝트 A와 B가 있습니다. 종속성은 B 대 A뿐입니다.

B  ‑‑> A

A와 B에서 각각 Doxygen을 실행하고 싶지만 여전히 B 문서에서 A에 대한 가능한 상호 참조를 허용합니다. (즉, B 문서를 탐색할 때 B에서 사용된 A의 클래스가 있으면 A 문서에 직접 연결할 수 있습니다.)

‑‑

[답변 답변 from 0x4b:] "CREATE_SUBDIRS"를 YES로 설정하고 태그 파일에 상대 경로를 사용하면 Doxygen이 어떻게든 잘못된 링크 참조를 만들 것입니다.

예를 따랐습니다.

 <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 

html/html/d1/d2 아래의 문서는 ../../ext1/html에 있는 외부 문서를 연결하려고 합니다. </코드>. 분명히 그들 중 하나는 실패할 것입니다.


참조 솔루션

방법 1:

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.

(by rnd_nr_genKirk Kelsey)

참조 문서

  1. How to cross‑reference already existing doxygen docs? (CC BY‑SA 3.0/4.0)

#C++ #doxygen #Documentation






관련 질문

파일의 암호화/복호화? (Encryption/ Decryption of a file?)

이상한 범위 확인 연산자가 있는 C++ typedef (C++ typedef with strange scope resolution operator)

개체 배열 매개변수--오류: '문자' 필드에 불완전한 유형이 있습니다. (Object array parameter--error: field ‘letters’ has incomplete type)

C++에서 메모리 삭제 (Deleting memory in c++)

C++ 프로그램을 실행할 수 없습니다. No se ejecuta el programa (C++ i can't run a program. No se ejecuta el programa)

컴파일 시 변수의 이름과 수명 (Name and lifetime of variables at compile time)

control-c 후 Visual Studio 콘솔 프로그램 충돌 (visual studio console program crashes after control-c)

멤버 변수에 std::enable_if 또는 유사한 메서드 사용 (Using std::enable_if or similar method on member variable)

ifstream input_file(filename); (I am receiving an error "no matching function to call" in the line ifstream input_file(filename);)

ESP8266에서 잠시 실행하면 JsonData 크기가 0이 됩니다. (JsonData size becomes zero after awhile of running in ESP8266)

합에 대한 속도 문제(제수의 합) (Speed problem for summation (sum of divisors))

벡터 벡터에서 하위 벡터의 첫 번째 값을 찾기 위해 begin() 및 end() 반복기의 범위를 지정하는 방법은 무엇입니까? (How to specify a range for begin() and end() iterators to find first value of sub vector in a vector of vectors?)







코멘트