Adding Documentation of a library to manual pages

杀马特。学长 韩版系。学妹 提交于 2019-12-24 01:59:11

问题


I am working with Ubuntu 12.04.1 . I am learning to make a basic video player using FFmpeg library in C . My manual pages don't show any entries for the headers/functions of the library . Can someone please show me a way to add the documentation to my manual pages .
It is much easy to search that way than searching on a web page everytime .

PS : I have tried to add documentation to man pages using Synaptic package manager . I installed a ffmpeg-doc package . But it doesn't seem to work .

Thanks .


回答1:


does this solve your problem -

http://ffmpeg-users.933282.n4.nabble.com/Building-man-pages-td934441.html




回答2:


FFmpeg project use doxygen to create documentation. Doxygen can be configured to output man format.

Modify the file doc/Doxyfile like below, to tell doxygen you want man page format.

GENERATE_MAN           = YES
MAN_LINKS              = YES

MAN_LINKS option is very important, because if you omit it, you can not find the correct api call by name.

After you configure ffmpeg project by invoke ./configure ..., use the target apidoc to create man pages.

$ make apidoc

The man pages will output to doc/doxy/man/man3, then append this path to your man page search path.

$ export MANPATH=$MANPATH:`pwd`/doc/doxy/man

Then you can look up man pages for ffmpeg library api.

$ man av_register_all

Note

The man pages generated by doxygen for most of the api library call just a link to real source man page.

After open with man, you have to use key / to search and jump to documentation part you want.



来源:https://stackoverflow.com/questions/14088271/adding-documentation-of-a-library-to-manual-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!