Jump to content
  • Advertisement
Sign in to follow this  
Clueless

Doxygen question (#ifdef problem)

This topic is 4751 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! Any doxygen users here? Probably! Has anybody here had the same problem and maybe solved it? I have a header file with a class that I only include if DEBUG is defined. Doxygen ignored everything inside the #ifdef ... #endif part ... no matter if it is defined or not. If it was defined in the same file it would work. The include guard is not a problem. [edit]Ignore that stupid remark ... of course the includeguard has a #ifndef ... I tried putting an #ifdef directly after the #define and the problem occurs as well. [/edit] But DEBUG has to be set in a global header file. Is there a way to fix that problem? Maybe by changing something in the Doxyfile? [Edited by - Clueless on May 24, 2005 7:22:02 AM]

Share this post


Link to post
Share on other sites
Advertisement
I haven't used doxygen before, but does it hate #if too? You could always give DEBUG a numerical value..

// instead of
#define DEBUG

... later on..
#ifdef DEBUG


// you could just do
#define DEBUG 0

.... later on...

#if DEBUG



Share this post


Link to post
Share on other sites
Thanks for the reply ... good idea. Unfortunately that too doesn't work.
;(

Maybe it is just because I messed with the standard settings.
Probably it usually works.
Such a thing as a bug would be weird. I don't think using ifdefs like that is bad design ... ?

Share this post


Link to post
Share on other sites
In the doxygen configuration file there is a setting named PREDEFINED. Stick it in there.

Also, the standard method of having debug only code is

#ifndef NDEBUG
//...
#endif


The assert macro uses this method for example.

Share this post


Link to post
Share on other sites
Thanks ... adding it to PREDEFINED did the trick.
Guess that is the kind of info I should be able to find in the documentation.
I'm not good at reading those I guess (I tried).
Pretty straightforward ... now that I think of it.

Thanks for the using ifndef as standard tip.
Should have thought of trying that after writing about the include guard (d'oh).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!