3

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?

Ben McCormick
  • 25,260
  • 12
  • 52
  • 71
Lars Bilke
  • 4,940
  • 6
  • 45
  • 63

3 Answers3

2

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
andrew cooke
  • 45,717
  • 10
  • 93
  • 143
1

Docco claims to support this now - https://github.com/jashkenas/docco/pull/96

Alastair Maw
  • 5,373
  • 1
  • 38
  • 50
0

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).

James Kanze
  • 150,581
  • 18
  • 184
  • 329