What version of Visual Studio are you using?

-Shayne

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@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



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to