Home:ALL Converter>How do I get Doxygen to expand macros from include files?

How do I get Doxygen to expand macros from include files?

Ask Time:2011-02-26T02:49:42         Author:May Oakes

Json Formatter

I have a number of multiline macros defined in a file called macros.h. In my doxyfile, I've got

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = NO
PREDEFINED             =
EXPAND_AS_DEFINED      =
SKIP_FUNCTION_MACROS   = NO

yet Doxygen still will not expand the macros in any source file that includes macros.h. I ran "doxygen -d Preprocessor doxyfile" to see the output of the preprocessor, and it outputs messages like:

#include macros.h: not found or already included! skipping...

Author:May Oakes,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/5121333/how-do-i-get-doxygen-to-expand-macros-from-include-files
Ben Voigt :

You've told your compiler about your include path, but you haven't told doxygen. So it tries to open \"macros.h\" and gets a file-not-found error.\n\nYou need to properly set INCLUDE_PATH in your Doxyfile.",
2011-02-25T18:57:48
yy