directshow+vs2010+win7 Configuration Instructions

Source: Internet
Author: User

I have to say, the use of Windows is really troublesome things, DirectShow this thing constantly updated, the knowledge of books completely keep up with the times, can only go to the blog to look up information. After Baidu, read a lot of articles, and finally completed their own DirectShow installation, configuration is win7+vs2010+windows SDK 7.1+vs2010sp1 (patch) +vc-compiler-kb2519277. Use VS2012 comrades to notice, may be configured the method will be very different, because it is said that VS2012 integration of the Windows SDK, do not know DirectShow is not integrated in the inside, let me study and then send a detailed explanation.
In theory, the installation sequence is as said by the bloggers (incidentally attached):

(1) Visual Studio (http://pan.baidu.com/s/1o65pOBg Password: PZPW)
(2) Windows SDK 7.1 (http://www.microsoft.com/en-us/download/details.aspx?id=8279)
(3) Visual Studio SP1 (see blog http://blog.csdn.net/feidewu/article/details/8105890)
(4) Vc-compiler-kb2519277.exe (http://www.microsoft.com/zh-cn/download/details.aspx?id=4422)

But there are a lot of details to note, this article I will be a large number of pictures to show the installation process, I hope to be helpful to everyone.

First of all, I began to install the failure of the experience, for everyone to learn from.

The computer has already installed the VS2010, this installation is not much to say, basically is mad point next. Then I downloaded Windows SDK 7.1, unzipped, click Setup installation, the installation is finished quickly, and no prompt error, but this time go to the installation directory C:\Program Files\Microsoft Sdks\windows\ Did not find v7.1 this folder, stating that the installation was not successful. Baidu a bit, found the need to NetFramework4.0 more than the version of the uninstall, so open the Control Panel, found that the computer installed is NetFramework4.5, so all the software with NetFramework4.5 words, including language packs and so on.

The reason may be that SDK 7.1 installs NetFramework4.0 on your computer, so if you find a version that is higher than 4.0 on your computer, you must abort the installation. This is the same as installing VS2010SP1 later than Microsoft Visual C + + x86 (x64) Redistributable-10.0.30319 later.
After unloading I installed the SDK again, this time is loaded, found VS2010 but can't open. However, I put on an indomitable vs2010sp1 (patch), the result is wrong.

Carefully look at the introduction, the original SDK installation can not check the Vc_compiler option, the first install of the SDK when it is sure to check this option (the default is tick). To prevent any further surprises, I uninstalled the VS2010 and SDK directly and started from scratch.

1. From the beginning Window SDK 7.1

According to the steps provided by the bloggers, from the beginning, the first installation of VS2010, loaded deliberately to the control Panel to see, at this time is already NetFramework4.0, it seems that VS2010 comes with. The next step is to install Windows SDK7.1, but be careful not to tick vc_compiler when installing. After loading to the installation directory to take a look, already have 7.1 This folder, instructions installed.

The SDK installation process has the following drawings:

First detect the installed build

The following step is the most important, you must remember to remove the Visual C + + Compilers this tick

2, Vs2010sp1
Then install VS2010SP1, this is only a VS2010 patch, but also has 1.5G, it is best to install offline version, because the online installation is very easy to interrupt. Before installing, uninstall the version that is higher than Microsoft Visual C + + x86 (x64) Redistributable-10.0.30319 (do not unload this version), such as 11.0.XXXXX. In this 10.0.40219 will have to unload, the back of this VS2012 patch best also unload it (not on this computer test, but if not installed VS2012, or uninstall it off good)


The installation process is much more time-consuming and almost as slow as installing VS2010.

3, Vc-compiler

After installing the SP1 patch, there is still the last step, install the VC compiler, this step is nothing to say, Mad dot next step is good.

4. Compiling baseclasses Project

After installation, the BaseClasses project needs to be compiled, and the directory is---C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow. The "Visual C + + Audio Video technology development and Combat" book (hereinafter referred to as "actual combat") in order to give the directory is show\samples\c++\directshow\baseclasses, because then the DirectShow is also integrated in DirectX , and now is integrated in the Windows SDK, and later with the version may change, Microsoft is such a hole, but original aim, we should be able to find patience.
When you find the project file that opens the SLn suffix and open it with VS2010, you will be prompted that the project version is too low to convert, and the next step is to follow the steps.

Then build the solution in Visualstutio (F7), because the DirectShow version used in combat is lower (VS2005), so there are various errors in the compilation of VS2010, The author also gives a detailed answer (solving the various confusing compilation errors in VS is really a lot of brains). Fortunately, the Windows SDK7.1 compatibility used in this article is fine, compiled once.

In order to use compile-generated library files in the project, we need to compile the project separately in four modes (DEBUG,DEBUG_MBCS,RELEASE,RELEASE_MBCS), You can get four types of strmbasd.lib, respectively, in the corresponding directory of baseclasses.

5. Add the Include directory, library directory, and additional dependencies

After the compilation succeeds, you need to set the path to the include path (include) and library file (Lib) in the project properties, create a new or open project, and set the common properties of the project. In the property manager, select Microsoft.Cpp.Win32.user in Debug or release mode, modify common Properties->c++ directory, add the following include path (note the order can not be wrong, otherwise will be error)

C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\baseclasses
C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\common

C:\Program Files\Microsoft Sdks\windows\v7.1\include

C:\Program Files\Microsoft Visual Studio 10.0\vc\include

Note that the above path may vary with the installation path of the program, the author is all the software installed in the C:\Program files.

In the Library directory , add the directory of the Lib file that just compiled the generated baseclasses library:

C:\Program Files\Microsoft Sdks\windows\v7.1\lib
C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\debug

C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\debug_mbcs

C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\release

C:\Program Files\Microsoft Sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\release_mbcs

C:\Program Files\Microsoft Visual Studio 10.0\vc\lib

The final step is to set a dependency attachment item, such as Linker, general properties,  Add: strmbasd.lib; winmm.lib; msvcrtd.lib; Other bloggers said they had to be separated by semicolons under the Windows system, but I put them in three rows, and there was no problem, probably on the same line, with semicolons separated.

Configuration complete

It is important to note that the above configuration is done in the user property, and the subsequent creation of a new project inherits these properties, which is convenient without having to repeat the configuration. Below you can start building the project experience DirectShow.

Next article, how to use Yushi Teacher's Camerads class

Reference documents:

http://blog.csdn.net/lzkit/article/details/18501637

Http://jingyan.baidu.com/article/546ae1856161cf1149f28c95.html

Http://blog.sina.com.cn/s/blog_7291f6ad0102v1yc.html

Http://zhidao.baidu.com/link?url= 9lkfygpbo6h6ug55ju-uyxqaw2qq2xvbra8gck2gqc8leymninfxusbbayveze9ehqpq0bwjhiuq3f6o3cwx3iw21kl-0_eiievvqjifb6g

directshow+vs2010+win7 Configuration Instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.