Visual Studio 2008 compile errors

Hello,
I can't seem to compile the testbed example with VS2008 on vista. BOX2D (2.0.1) is ok, but I was hoping somebody might be able to help 🙂

The debug version compiles fine, it's just when I compile the release version of TestBed I get the following errors:

Code:
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(139) : error C2220: warning treated as error - no 'object' file generated
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(139) : warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(241) : see declaration of 'stdext::exception'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(138) : see declaration of 'std::bad_cast'
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(160) : warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(241) : see declaration of 'stdext::exception'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(159) : see declaration of 'std::bad_typeid'
1>TestEntries.cpp
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(139) : error C2220: warning treated as error - no 'object' file generated
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(139) : warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(241) : see declaration of 'stdext::exception'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(138) : see declaration of 'std::bad_cast'
1>c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(160) : warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\exception(241) : see declaration of 'stdext::exception'
1>        c:\Program Files\Microsoft Visual Studio 9.0\VC\include\typeinfo(159) : see declaration of 'std::bad_typeid'


Thanks.
Just a wild guess, but maybe you need to turn off exception handling? Box2D does not throw any exceptions and all those errors seem to be related to exceptions.
Well, you pointed me in the right direction anyway and I suspect the creators need to re-think some of the compiler options they've made.

The one causing the problem was /WX (treat warnings as errors), so there wasn't actually anything wrong! (well, just something the msvc compiler didn't like). Another option, /wp64 (detect 64bit portability problems), is now deprecated so should probably be removed as well.

There's also another problem which I haven't found the answer to yet, is that whether it is release or debug mode it errors on running with failure to find msvcp90.dll or msvcpd90.dll. These dll's are fine and I compile my own code with the same runtime settings so there must be something set in the hideous manifest settings somewhere.

Anyway, for those with 2008 (or vista) the solution is the turn off these two flags for the testbed.
Found a fix for the dll anyway. For some reason, even though the project is set up to embed the manifest file, it isn't doing it properly and setting the compiler to an external manifest fails to create one too.

So to get it to work I created the manifest file manually as below and all works (with the flags above set)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

Original thread: https://box2d.org/forum/viewtopic.php?t=1432