Need some help with pre-processign functions in C using Doxygen ...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

I'm currently documenting source code in C and would like to skip some
functions that don't need to be documented.

The syntax that I'm using is defined below.

#ifndef SKIP

/* Code to be skipped */

#endif SKIP

Where SKIP= Predifined Tag Name

I'd like to know if anyone on this list has been using Doxygen to
pre-process code fragments.

In case you do pre-process the code, I'd appreciate your inputs with an
alternative method to ignore code fragments.

The problem is that Doxygen compiles it but the C compiler reads the /*
Code to be skipped */ as comments !!!

Please help !
 
Thanks,
Ruchi


Re: Need some help with pre-processign functions in C using Doxygen ...

Quoted text here. Click to load it

Of course it does!  You wrote it as a /* comment */, after all, so
what else would the C compiler be expect to think it is?  Now, here's
the question your post failed to address: why is that "the problem"?

--
Hans-Bernhard Broeker ( snipped-for-privacy@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Re: Need some help with pre-processign functions in C using Doxygen ...

Quoted text here. Click to load it

I think what he meant was that within the section of code between the
#ifndef and the #endif, the C compiler jumped over the code (since it is
removed by the pre-processor), while Doxygen used the code.  Thus Doxygen
is generating documentation for functions that are never seen by the
compiler.  Don't know the answer to the problem, however, having only used
doxygen a few times.


Re: Need some help with pre-processign functions in C using Doxygen ...
Hi,

Quoted text here. Click to load it

It works for me. Make sure that
  - "ENABLE_PREPROCESSING = YES" is included in your doxygen config file.
  - SKIP is defined, e.g. by having "PREDEFINED = SKIP" in your doxygen
    config file or by defining it by "#define SKIP" in the source. (The
    former is definitively nicer.)

Best regards,
  Tobias

Site Timeline