I am VERY confused by the Doxygen configuration file. I cant seem to figure out how to make it compile code between
#ifdef __cplusplus and
#endif Also I dont understand how to change what it does with preprocessor symbols or how to make it NOT generate documentation on something. Any help would be appreciated.
ifdef _cplusplus and
endif require c++ compiler, such as make sure the file has *.cpp extension. If you are using a C compiler only then you can't make it compile that c++ code.
I don't know a thing about your other question.
Its a documentation program... and its ignoring the conditional code inside the preprocessors.
Assuming that you are using the wizard program (i.e. the GUI program, not the command-line one), then you will find the useful sections for configuration under the "input" and "preprocessor" tabs of the Expert configuration wizard.
Under "Input" you can configure the directories and files to include (INPUT), the file patterns (file extensions to include), the files or directories to exclude, the file patterns to exclude, the symbols to exclude (e.g. I often configure to exclude then entire "detail" namespace, in which case, I just add the keyword "detail" to the EXCLUDE_SYMBOLS field), and other stuff.
Under "Preprocessor", you can control the pre-processing done. Of course, because doxygen is not a compiler, it doesn't automatically define symbols such as
__cplusplus , so, you need to explicitly provide those definitions. First, you obviously need to tick the "ENABLE_PREPROCESSING" check-box. Second, you can either list the predefined symbols you need to enable those conditionally compiled pieces of code (you do so under the "PREDEFINED" field), or you can put all those #defines in a header file (that isn't included by any parts of the real code, and is also excluded from the doxygen input) and then add that header file folder to the "INCLUDE_PATH" such that doxygen will pre-process it and thus define all the predefined symbols that you need.
Finally, to control the things that are documented and not, you will find those under the "Build" tab where you can tick all the options you like. Typically, I hide un-documented elements (classes, members, etc.), and extract most things, etc. You can also make it generate a to-do list (with
\todo tag), a test list (with
\test ) and a bug list (with
There are a lot more options and stuff, but that's a start. Basically, you won't find the useful stuff if you stick to the basic wizard, you need to use the expert (which actually has just about every option there is). There are also many commands that can do fancy stuff.