Extracting C / C++ function prototypes

I use ctags

# p = function declaration, f = function definition
ctags -x --c-kinds=fp /usr/include/hal/libhal.h

Also works with C++

ctags -x --c++-kinds=pf --language-force=c++ /usr/include/c++/4.4.1/bits/deque.tcc

Note, you may need to add include paths, do this using the -I /path/to/includes.

Leave a Comment