I would like the get a similar output on documented c++ implementation files (not header files) like the output generated with docco. Is there such a tool?
-
5Have you seen [Doxygen](http://www.doxygen.org)? – elmo Jan 04 '12 at 10:40
-
Sure, but I was looking for side by side documentation like in docco. – Lars Bilke Feb 07 '12 at 13:05
3 Answers
the docco source (git repo) has c support. if you clone it you can install it locally with npm. however:
i had to compile the docco.coffee to javascript:
cd docco/src coffee -c docco.coffee cp docco.js ../lib
if you have header and c files with matching names, in the same directory, one overwrites the other.
for some reason everything node.js related is segfaulting like crazy, but i think this must be something wrong with my install (luckily, docco segfaults at the end, after generating the output).
update - as a fix for the overwrite issue i cloned the repo and dropped the removal of the file extension. so foo.h
now goes to foo.h.html
which doesn't over-write foo.c.html
. you can grab a copy from https://github.com/andrewcooke/docco
i also recompiled the javascript, so to use do something like:
git clone git://github.com/andrewcooke/docco.git
npm install docco
docco src/*.c src/*.h

- 45,717
- 10
- 93
- 143
Docco claims to support this now - https://github.com/jashkenas/docco/pull/96

- 5,373
- 1
- 38
- 50
I'm not familiar with docco, but it looks like a form of literate programming. If this is the case, you might want to look at cweb. The syntax is probably different, but it does work with C++ (even if it was designed with C in mind).

- 150,581
- 18
- 184
- 329