Cannot debug osg/dotnet application on windows after update from 2.9.7
Hi all,
This week I updated OpenSceneGraph to 2.9.9 and got the following problem in an osg/dotnet application, windows 7, vs2008sp1:
"The Program can't start because MSVCP90D.dll is missing from your computer. Try reinstalling the program to fix this problem."
This happens after trying to load a file with an osgDB plugin.
when linking with osg 2.9.7 this problem does not occur. So I tranced down the changes in osg and found the following change in src\OpenThreads\win32\CMakeLists.txt
From Alok Priyadashi, "The attached patch fixes
- compile errors on windows when compiled with UNICODE flag
- warnings for duplicate WIN32_LEAN_AND_MEAN. I think this should
better fixed by adding WIN32_LEAN_AND_MEAN to vcproj preprocessor
list."
ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0400)
reverting this change resolved the problem for me.
with the _WIN32_WINNT definition a particular version of Windows is targeted, in this case this causes a problem finding the right version of the debug dlls in the dotnet application ... (bleh...)
The problem does not occur in the c++ examples/applications.
cheers,
René
<div>
<p>Hi all,</p>
<div><br></div>
<div>This week I updated OpenSceneGraph to 2.9.9 and got the following problem in an osg/dotnet application, windows 7, vs2008sp1:</div>
<div><br></div>
<div>"The Program can't start because MSVCP90D.dll is missing from your computer. Try reinstalling the program to fix this problem."</div>
<div><br></div>
<div>This happens after trying to load a file with an osgDB plugin.</div>
<div><br></div>
<div>when linking with osg 2.9.7 this problem does not occur. So I tranced down the changes in osg and found the following change in src\OpenThreads\win32\CMakeLists.txt </div>
<div><br></div>
<div>
<div><span class="Apple-style-span"> From Alok Priyadashi, "The attached patch fixes <br>
- compile errors on windows when compiled with UNICODE flag <br> - warnings for duplicate WIN32_LEAN_AND_MEAN. I think this should <br> better fixed by adding WIN32_LEAN_AND_MEAN to vcproj preprocessor <br> list."</span></div>
</div>
<div><span class="Apple-style-span"><br></span></div>
<div>
<div> ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)</div>
<div> ADD_DEFINITIONS(-D_WIN32_WINNT=0x0400)</div>
</div>
<div><br></div>
<div>reverting this change resolved the problem for me.</div>
<div><br></div>
<div>with the <span class="Apple-style-span">_WIN32_WINNT definition a </span><span class="Apple-style-span">particular version of Windows is targeted, in this case this causes a problem finding the right version of the debug dlls in the dotnet application ... (bleh...) </span>
</div>
<div><br></div>
<div>The problem does not occur in the c++ examples/applications.</div>
<div><br></div>
<div>cheers,</div>
<div><br></div>
<div>René</div>
<div><br></div>
</div>