Doxygen's preprocessor seems to be evaluating some macros wrong, can I override it?

StackOverflow https://stackoverflow.com/questions/22211847

  •  10-06-2023
  •  | 
  •  

Question

I am using a third party library that includes a lot of macro's to enable and disable different sections of code. I am enabling some sections of code, but for some reason doxygen's preprocessor does not agree with my compiler's processor!

I set ENABLE_PREPROCESSING to NO and the documentation that I wanted to see was included. However, when I turn off preprocessing, I then lose the documentation on any of the macros in my project.

I reenabled preprocessing and tried to predefine the symbols that doxygen seemed to be confused about in the following manner:

NAME := 1.

This still didn't seem to solve my issues.

Is there a way to selectively disable the preprocessor to ignore certain sections of code where it seems to be having problems?

Was it helpful?

Solution

The issue was a #pragma error ", but it didn't have a closing quote. That error message was being ignored by my compiler's preprocessor due to some surrounding #ifs and thus "error: bla" didn't show up in my compiler's output. But it still caused doxygen to stumble and all of the code sections following that were not included in my output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top