[osg-users] New way to workaround MSVC False Positives

Can T. Oguz ctoguz at gmail.com
Thu Mar 26 09:41:25 PDT 2009


Sorry, forgot to mention : Vista SP1, MSVC 2008. Have you tried it?

Can

2009/3/26 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <
Shayne.Tueller at hill.af.mil>

> What version of Visual Studio are you using?
>
> -Shayne
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Can T.
> Oguz
> Sent: Thursday, March 26, 2009 10:25 AM
> To: OpenSceneGraph Users
> Subject: [osg-users] New way to workaround MSVC False Positives
>
> Hi OSG Users,
>
> I think I've found an easier work around to overcome the MSVC false
> positives. I had been using the prescription at
> http://www.vis-sim.com/3dsceneBB/viewtopic.php?t=1027 to avoid the leak
> false positives for my desktop application and it worked perfectly but now
> I've packed the source into an MFC ActiveX and I saw that all leaks came
> back. So I've removed all the additional dependencies and linked the dlls
> by
> the directives and all the false positives are gone. I've tested the leak
> detection and it worked ok.
>
> The new workaround is :
>
> . Goto project settings. In there, make the following changes for theDebug
> build.
> . General->Use of MFC->Use Standard Windows Libraries.
> . Add _AFXDLL to C/C++->Preprocessor->Preprocessor Definitions.
> . Add the following pragma directives to stdafx.h right after the MFC
> includes:
>
> #ifdef _DEBUG
>  #pragma comment(lib, "OpenThreadsd.lib")
>  #pragma comment(lib, "osgd.lib")
>  #pragma comment(lib, "osgDBd.lib")
>  #pragma comment(lib, "osgUtild.lib")
>  #pragma comment(lib, "osgGAd.lib")
>  #pragma comment(lib, "osgViewerd.lib")
>  #pragma comment(lib, "osgTextd.lib")
>  #pragma comment(lib, "osgSimd.lib")
> #else
>  #pragma comment(lib, "OpenThreads.lib")
>  #pragma comment(lib, "osg.lib")
>  #pragma comment(lib, "osgDB.lib")
>  #pragma comment(lib, "osgUtil.lib")
>  #pragma comment(lib, "osgGA.lib")
>  #pragma comment(lib, "osgViewer.lib")
>  #pragma comment(lib, "osgText.lib")
>  #pragma comment(lib, "osgSim.lib")
> #endif
>
> #pragma comment(lib, "opengl32.lib")
> #pragma comment(lib, "glu32.lib")
>
> Regards,
>
> Can
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090326/929b3024/attachment-0003.htm>


More information about the osg-users mailing list