I have a struct, and by convention, I need to use a certain macro in order to declare a variable of that type:
the struct:
struct basic_struct {
int a;
int b;
};
the macro:
#define BASIC_VAR(var_name) struct basic_struct var_name
I encountered a problem with Doxygen when using this macro inside an anonymous struct, as follows:
struct {
BASIC_VAR(var_1);
int var_2;
} my_struct;
I get the Doxygen warning:
warning: no uniquely matching class member found for BASIC_VAR(var_1)
when:
1) dropping the macro
struct {
struct basic_struct var_1;
int var_2;
} my_struct;
2) not using anonymous struct
struct my_struct_t {
BASIC_VAR(var_1);
int var_2;
} my_struct;
I get no warnings. But I have to use the macro, and I prefer to keep using the anonymous struct, there's any Doxygen command I can use to avoid this warning?
I believe you need to set
MACRO_EXPANSION
toYES
in the Doxyfile so that Doxygen will expand your macro. See http://www.doxygen.nl/manual/preprocessing.htmlAdditionally, you may need to add your macro to the PREDEFINED tag.