Compile baseclasses
LIGO,
2009.4.17
Because the header file of this project contains the <> symbol, you must set the vs inclusion path before performing any of the following operations, add the baseclasses project directory to the vs inclusion path. This project requires such settings, which are not very good. It will actually appear as a "Demo". Moreover, for different developers, it may be placed in different directories, therefore, this setting is not good. So I didn't set this path, but modified the project's inclusion file to solve this problem, because my project was not directly compiled in the default directory it was installed, instead, I copied it to another place for compilation.
Note: vs2008 is used for compilation, Vista is OS, and baseclasses is obtained from the installation package of Windows SDK (early DirectShow examples are all in the independent installation package of DirectX, now all the new ones are changed to be released from the Windows SDK installation package), and combase is in my project. h file. If some versions do not have this file, I don't know if it can be compiled smoothly.
:
Web: http://www.microsoft.com/downloads/details.aspx? Familyid = F26B1AA4-741A-433A-9BE5-FA919850BDBF & displaylang = en
Name: Windows SDK for Windows Server 2008 and. NET Framework 3.5
File Name: 6.0.6001.18000.367-krmsdk_en.iso
Size: 1.29 GB
The default installation path is C:/program files/Microsoft sdks/Windows/v6.1.
By default, It is compiled into a static Link Library, which is very simple. You only need to set the included path to Compile directly, but I want to use a dynamic library, therefore, I directly modify the compilation option to a dynamic link, and then set the streams. the symbols in H that contain local files are all changed from <> to double quotation marks "", and then compiled at the time of compilation. It is said that _ clsid_memoryallocator cannot be linked (the actual code is clsid_memoryallocator, with no leading underline)
I found that clsid_memoryallocator is declared in UIDs. H, so the relevant file contains the uuids. h file and then compiles the file. However, it is said that mediasubtype_none is not declared and dizzy!
Searching on the internet, I found that many of them are very simple, and they are all copied to copy and say the same, it is hard to find a better one: Z and Z. lib is added to the compilation option (the above description includes UIDs. all modifications to the H file are revoked ),
Figure 1
Note: Some baseclasses projects do not seem to have the linker tab. I didn't find out where to add the two Lib. I think there should be some places to add. Re-compile. However, g_templates is not declared and cannot be linked.
Search for g_templates from the code and find that it is included by a macro-defined filter_dll. Therefore, filter_dll is added to the link options,
Figure 2
Compile again. However, only the following two errors are returned this time:
1. baseclasses/sysclock. cpp (23): Error c2440: 'initializing': cannot convert from 'const guid * 'to 'const wchar
1> types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
2. baseclasses/sysclock. CPP (23): Error c2440: 'initializing': cannot convert from 'cunknown * (_ stdcall *) (lpunknown, hresult *) 'to 'const CLSID *'
1> there is no context in which this conversion is possible *'
First error. Check the class declaration of cfactorytemplate and find that the first two members are:
Const wchar * m_name;
Const CLSID * m_clsid;
This is different from the value appended with g_templates during the Declaration, so the Declaration Order of the two members is changed:
Const CLSID * m_clsid;
Const wchar * m_name;
The second error is that the const wchar * csystemclock: createinstance is directly used when values are included in the g_templates declaration.
The solution to these two errors fails to test whether it will cause incorrect consequences. Then compile the program. However, it is said that the timeendperiod cannot be linked. Check msdn and add winmm. Lib directly in the position shown in Figure 1. then compile the program and finally pass it!