Normal
I had the same problem. It takes some significant digging and understanding of the new VS2005 compiler.There are a few compiler and linker problems if you attempt to build as you have with previous versions of the compiler. The first is that the compiler no longer puts a default value type of 'int' on any unspecified type declarations or function return types. So you will have to edit the BaseClasses source files to fix these problems. There are only two of them. One is:operator=(LONG);You will just need to change it to: COARefTime& operator=(LONG);The second is a variable being declared without a type, I don't remember the exact line and file, but you just need to make it a DWORD type.The second problem is the new compiler adheres to the proper (see the ANSI C++ standard) behavior for variables declared in a for loop, which the old compiler didn't. Whomever wrote the BaseClasses code for Directshow did not follow the standard, therefor the code no longer compiles. To fix this one you will need to go into the makefile in the BaseClasses directory and add:/Zc:forScope-to both of the $(CC) compiler call lines. This will turn off ANSI C++ compliance for the for scope declaration issues.Next you will want to make sure you are using the prescribed build method for the BaseClasses source. I just built a little batch file that does it all for me. Here is what it looks like (note: you will need to put this in the BaseClasses directory and replace my VS install path with yours):call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"call "..\..\..\..\setenv.cmd" /XP32 /DEBUGnmake /Acall "..\..\..\..\setenv.cmd" /XP32 /RETAILnmake /Axcopy /Y .\XP32_DEBUG\strmbasd.lib ..\..\..\..\Lib\strmbasd.libxcopy /Y .\XP32_RETAIL\strmbase.lib ..\..\..\..\Lib\strmbase.libSecondary note: you may need to change this batch file further if you are targetting a different platform than 32Bit XP. Take a look at the setenv.cmd file in the PlatformSDK root for more options.Drak
I had the same problem. It takes some significant digging and understanding of the new VS2005 compiler.
There are a few compiler and linker problems if you attempt to build as you have with previous versions of the compiler. The first is that the compiler no longer puts a default value type of 'int' on any unspecified type declarations or function return types. So you will have to edit the BaseClasses source files to fix these problems. There are only two of them. One is:
operator=(LONG);
You will just need to change it to:
COARefTime& operator=(LONG);
The second is a variable being declared without a type, I don't remember the exact line and file, but you just need to make it a DWORD type.
The second problem is the new compiler adheres to the proper (see the ANSI C++ standard) behavior for variables declared in a for loop, which the old compiler didn't. Whomever wrote the BaseClasses code for Directshow did not follow the standard, therefor the code no longer compiles. To fix this one you will need to go into the makefile in the BaseClasses directory and add:
/Zc:forScope-
to both of the $(CC) compiler call lines. This will turn off ANSI C++ compliance for the for scope declaration issues.
Next you will want to make sure you are using the prescribed build method for the BaseClasses source. I just built a little batch file that does it all for me. Here is what it looks like (note: you will need to put this in the BaseClasses directory and replace my VS install path with yours):
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
call "..\..\..\..\setenv.cmd" /XP32 /DEBUG
nmake /A
call "..\..\..\..\setenv.cmd" /XP32 /RETAIL
xcopy /Y .\XP32_DEBUG\strmbasd.lib ..\..\..\..\Lib\strmbasd.lib
xcopy /Y .\XP32_RETAIL\strmbase.lib ..\..\..\..\Lib\strmbase.lib
Secondary note: you may need to change this batch file further if you are targetting a different platform than 32Bit XP. Take a look at the setenv.cmd file in the PlatformSDK root for more options.
Drak