Re: [Doxygen-users] The #if defined-#endif block, I can't get the correct result...
Brought to you by:
dimitri
From: Fabian C. <Cen...@in...> - 2014-01-22 08:02:46
|
At 01:51 22. 01. 2014, yulily wrote: >I just started using doxygen to document a C project.And there is some >questions. >The program like this: >#if defined (ABC) >#include "aaa.h" >#include "bbb.h" >#include "ccc.h" >#include "ddd.h" >/** >* @param [in] : null >* @param [out] : null >* @retval : OK-success >* @retval : ERROR-fail >*/ >int abcd(void) >{ > return (abcde()); >} >#endif > >I would expect Doxygen would produce document within the #if defined-#endif >block, however it ignores them.The documents produced only have a file and >it can't identify the function and it's annotation...but if I delete the #if >defined and #endif,i can get the correct result. Where does ABC get defined if you compile your program normally? It either needs to be defined in the sources e.g. some included header or then it is given on the command line. In this case you need to adjust the doxygen config and add ABC to the list of predefined macros. This is the equivalent of -DABC for gcc. bye Fabi |