RE: [Doxygen-users] Bug
Brought to you by:
dimitri
From: Trevor R. <Tre...@pe...> - 2001-05-15 15:47:21
|
Hi, I imagine your problem is due to Doxygen not being configured to preprocess your source as you would expect. I use macros extensively with Doxygen (not because I'm evil, but because there's no other way to write portable code) without any problems. But before I did everything I mention below, Doxygen was very confused. Are you sure that you have preprocessing (ENABLE_PREPROCESSING = YES) and macro expansion (MACRO_EXPANSION = YES) enabled, but EXPAND_ONLY_PREDEF = NO? If so, the next step is to make sure Doxygen sees the definition of your macro. In your example below, everything should work as is. If you #include the file containing the macro definition, you need to make sure that SEARCH_INCLUDES = YES, and that INCLUDE_PATH contains the path to the file. (I don't think Doxygen even complains if it can't find a #included file.) If you don't #include the definition in every file that needs it (remember that Doxygen treats each file individually) and don't want to (i.e. you rely on other consumers to #include your headers in a certain order), you can use the PREDEFINED setting. Hope that helps, Trevor -----Original Message----- From: Shane Stevens [mailto:sh...@bl...] Sent: Monday, May 14, 2001 8:53 PM To: Doxygen-Users Subject: [Doxygen-users] Bug Hi, I have found a nasty little bug which has lost me a LOT of time. Symptom: Sometimes all the member documentation disappears for certain classes. So if I put a ';' after a macro use it all works, the problem is it is perfectly legal c/c++ NOT to have a semi colon, and all compiler pre-processors can handle not having one, and hence I use it when I want a macro to look like a function call, and other times I use it for pure pre-processor replacement. I have hundreds of files without a ';', so to go back and add one is painful, and incorrect. Cause: Using macros, inside a class, and not putting a semi-colon on the end of its use. Example: Fail example: #define MACRO() public: class blah { MACRO() public: blah(){}; ~blah(){}; }; Work example: #define MACRO() public: class blah { MACRO(); public: blah(){}; ~blah(){}; }; Has anyone else seen this problem before? Can it be fixed easily? Thanks, Shane _____ <http://staff.bluetongue.com/~shane/> Shane Stevens Lead Programmer <http://www.bluetongue.com/> bluetongue _____ |