I've recently been trying to create units tests for some legacy code.
I've been taking the approach of using the linker to show me which functions cause link errors, greping the source to find the definition and creating a stub from that.
Is there an easier way? Is there some kind of C++ parser that can give me class definitions, in some easy to use form, from which I can generate stubs?
You may want to investigate http://os.inf.tu-dresden.de/vfiasco/related.html#parsing. But C++ parsing is hard.
On the other hand, maybe ctags or something similar can extract class definitions...
You may also try to write your own simple (?) parser to generate class stubs from header files...
I tried to give you some pointers. As you see, the problem is not easy. But hopefully you can automate at least some part of it.