Re: omiidl doc missing?

Stefan Seefeld <[email protected]> Fri, 10 Mar 2006 12:50:32 -0500
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
CARTER-HITCHIN, David, FM wrote:
> Hi Stefan,
> 
> I've managed to install Synopsis ok now, but I get an error when trying to
> parse C++:
> 
> Error: no processor 'Cxx.Parser'

This sounds is if either occ.so wasn't correctly installed into
<prefix>/lib/python<version>/site-packages/Synopsis/Parsers/Cxx or
it can't resolve some symbols when python attempts to load it.

> I've put lib/pkgconfig, share, lib/python2.4/site-packages and
> lib/python2.4/site-packages/Synopsis/Parsers in the PYTHONPATH, but no luck
> - any idea?  I can see there is a Cxx directory under

PYTHONPATH is only required if <prefix> above isn't the same as the
one python itself was installed in. In that case, it should point
at the directory containing the toplevel 'Synopsis' package.

> lib/python2.4/site-packages/Synopsis/Parsers (and I tried putting
> lib/python2.4/site-packages/Synopsis/Parsers/Cxx into PYTHONPATH too).
> Sorry my knowledge of Python is not good..

Please make sure occ.so is in the right place (see above) and sees the
libraries it was linked against. In particular, installing synopsis
will install libSynopsis.so into <prefix>/lib, which therefor should
be searched by ld.so (either configure ld.so via /etc/ld.so.config or
set your LD_LIBRARY_PATH to point to <prefix>/lib).
If neither works, try 'manually' loading the parser in an interactive
python shell. From the python command prompt, issue

from Synopsis.Parsers.Cxx import Parser

and see whether that works.

> Also, reading the manual, I'm not immediately sure how to parse lots of cpp
> files in one go - we have about 2000 source files which I want to be able to
> cross-reference.  Can I do this on the command-line or am I going to need to
> write some kind of script?

Synopsis allows you to specify multiple input files, no matter whether you
use the 'synopsis' applet itself, or a synopsis script (as discussed in the
tutorial).
There is, however, an efficiency consideration. If you parse lots of input
files individually (no matter whether you put them all in one command line
or not) quite a lot of code will have to be parsed multiple times (all the
headers that are included in different source files).
It would thus be better to have a single header including everything else,
and then specify the 'main_file_only=False' property of the Cxx parser so
it doesn't mask declarations from included files.

Good luck !

		Stefan