问题
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