[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[News.eclipse.dsdp.mtj] Re: Defines in files included by preprocessor a re not honoured

Euclides Neto wrote on Fri, 21 August 2009 09:36
Hello David,

In order to help us to better understand the problem, could you send us some examples of defines that depends on definition of other defines?

Thanks,
-- Euclides


Yes of course:

//#if (USE_IMAGEMANAGER) && ( USE_IMAGEMANAGER == 1 )
//#define DO_USE_IMAGEMANAGER
//#else
//#undefine DO_USE_IMAGEMANAGER
//#endif

//#if (DEBUG_IMAGE_MEMORY) && ( DEBUG_IMAGE_MEMORY == 1 )
//#define DO_DEBUG_IMAGE_MEMORY
//#else
//#undefine DO_DEBUG_IMAGE_MEMORY
//#endif

//#ifdef DO_DEBUG_IMAGE_MEMORY
   //#ifndef DO_USE_IMAGEMANAGER
       //#undefine DO_DEBUG_IMAGE_MEMORY
   //#endif
//#endif


In the code above, USE_IMAGEMANAGER and DEBUG_IMAGE_MEMORY are defined in the project, but not DO_USE_IMAGEMANAGER and DO_DEBUG_IMAGE_MEMORY.

DO_USE_IMAGEMANAGER is defined for a short of /#if (USE_IMAGEMANAGER) && ( USE_IMAGEMANAGER == 1 )

The same with DO_DEBUG_IMAGE_MEMORY, but also depends of DO_USE_IMAGEMANAGER to be defined.