Patrick Hartling wrote:
> Allen Bierbaum wrote:
>> I was just trying to track down why an FDEBUG macro was not working and 
>> I think I found the cause.  It looks like OSG_DEBUG is never being 
>> defined on Linux because the build is not defining _DEBUG.
>>
>> Can any one else confirm this problem?
> 
> _DEBUG is a Visual C++-ism AFAIK whose primary (sole?) purpose is to
> indicate the use of the Visual C++ debug runtime during compilation. I know
> for sure that some Windows headers check for the usage of this symbol and
> declare one function or another depending on whether it is being used. You
> should consider carefully whether you want to use it on other platforms.

Is there something similar for gcc?

As it stands right now, OpenSG 2.0 is setup like this:

(see OSGConfig.h)

#ifdef _DEBUG
#define OSG_DEBUG
#endif

So AFAIK OSG_DEBUG is never defined on non-windows platforms.  I think 
we need to do one of:

1. Define _DEBUG on non-windows platforms as part of the cxxflags when 
building debug.
2. Change the ifdef to use something that works with gcc.

Anyone have ideas for a good fix?

On a related note, we need to make sure that whatever we do doesn't 
cause problems when compiling debug user code against optimized OpenSG 
and vice versa.  (for example we don't want the size of a data structure 
to change)

-Allen

> 
>  -Patrick
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to