How to use valadoc?

我的梦境 提交于 2019-12-20 04:53:24

问题


I am currently writing a library in Vala.

I have come to a point where I would like to generate some documentation from my sources.

valadoc seems to be the right tool to do this, but there is not much information on how to use it, the manpage is very short.

I tried to run it with valadoc -o doc src/*.{vala,vapi} which gives me these error messages:

unixodbc.vala:21.7-21.9: error: The namespace name `Gee' could not be found
unixodbc.vala:40.9-40.27: error: The type name `Map' could not be found
unixodbc.vala:42.30-42.48: error: The type name `Map' could not be found
unixodbc.vala:40.9-40.27: error: The type name `Map' could not be found
unixodbc.vala:40.9-40.27: error: The type name `Map' could not be found
unixodbc.vala:40.9-40.27: error: The type name `Map' could not be found
unixodbc.vala:80.63-80.81: error: The type name `Map' could not be found
unixodbc.vala:98.9-98.25: error: The type name `ArrayList' could not be found
unixodbc.vala:99.3-99.19: error: The type name `ArrayList' could not be found
unixodbc.vala:110.4-110.22: error: The type name `Map' could not be found
unixodbc.vala:178.9-178.24: error: The type name `ArrayList' could not be found
unixodbc.vala:180.17-180.32: error: The type name `ArrayList' could not be found
unixodbc.vala:187.10-187.25: error: The type name `ArrayList' could not be found
Failed: 13 error(s), 0 warning(s)

As it seems valadoc was designed to be run on all dependencies as well?

How can I get this to work for my library?


回答1:


You need to pass --pkg gee-0.10 (or whatever version you are using), just like valac. See the valadoc --help and the man page for a list of options and their descriptions. Many of the options you'll need are the same as those you would pass to valac.



来源:https://stackoverflow.com/questions/19211187/how-to-use-valadoc

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