I've been on directx 8.1b and vc++ 6.0 up until now and am seeing the light to move towards directx 9.0c (august 2007) and vc++ 2005 express. But I am trying to move a 'directx 8.1b and vc++ 6.0' app to be 'directx 8.1b and vc++ 2005 express' I open the .dsw and get prompted to convert it to .vcproj, no problems. I add the incl and lib 8.1b paths into my search paths. When I complile I get many warning and errors out of the wizard code that the directx 8.1b env cretaed. One error I get is the following: for( DWORD i=0; i<m_dwNumBuffers; i++ ) { if( m_apDSBuffer[i] ) { DWORD dwStatus = 0; m_apDSBuffer[i]->GetStatus( &dwStatus ); if ( ( dwStatus & DSBSTATUS_PLAYING ) == 0 ) break; } } if( i != m_dwNumBuffers ) return m_apDSBuffer[ i ]; On the 'if( i != m_dwNumBuffers )' line I get the following complile error .\dsutil.cpp(647) : error C2065: 'i' : undeclared identifier This compiles fine under VC++ 6.0. I anticipate this is because VC++ 2005 has stricter rules, perhaps, for inline declarations and DWORD i declare in the for loop above is out of scope?? *maybe* There are lots of these compilation errors coming out of the code that was originally generated by the directx 8.1b wizard. Is there a way for me to get around this?? Thanks for any help.
On Fri, 16 Nov 2007 14:00:00 -0800, huh? wrote: > .\dsutil.cpp(647) : error C2065: 'i' : undeclared identifier > > This compiles fine under VC++ 6.0. > > I anticipate this is because VC++ 2005 has stricter rules, perhaps, for > inline declarations and DWORD i declare in the for loop above is out of > scope?? *maybe* > > There are lots of these compilation errors coming out of the code that was > originally generated by the directx 8.1b wizard. Is there a way for me to get > around this?? A common problem and you need to fix these so that the declaration is outside the for loop so that it is standards conformant. The compiler has become more strict. -- Please read this before replying: 1. Dshow & posting help: http://tmhare.mvps.org/help.htm 2. Trim & respond inline (please don't top post or snip everything) 3. Benefit others: follow up if you are helped or you found a solution