Compiling WEBRTC under Windows

Source: Internet
Author: User

Objective

The purpose of this article is to save you 10 hours (or more) of your life, or to waste 10 minutes. WEBRTC's compilation has been called a nightmare as a large cross-platform base library that Google has frequently updated. If you happen to want to compile WEBRTC under Windows, you'd better evaluate your patience in advance.

As of now, I have tried almost all the articles in the Chinese blog community, which can be said to have failed. I do not know how long this article is valid, because the webrtc.org community of guys update is too diligent!

Environment

Os:microsoft Windows 7 Ultimate 6.1.7601 Service Pack 1 Build 7601

All you need is a Win7 64 machine, and the rest is provided with WEBRTC. If you use the WEBRTC built-in Toolchain, the host machine's installed python and VS, and so on WEBRTC can be irrelevant, please do not be fooled by some articles.

Turn on VPN

The reason you know. It is recommended to pick a fast TW or JP node to keep the network unobstructed.

Installing Depot_tools

Using SVN Checkout

    1. HTTP://src.chromium.org/svn/trunk/tools/depot_tools

Then run Depot_tools\gclient.bat, which triggers the detection logic and automatically downloads Python276_bin and Git-1.9.0.chromium.6_bin.

At this point, I assume that Depot_tools has been installed. If not, please close this page and then Google yourself.

Check out WEBRTC code

Create a folder called WEBRTC, and then create a new bat script that writes:

  1. Set path=[your depot_tools path, such as C:\depot_tools];%path%
  2. Call Gclient. Bat Config --name src http://webrtc.googlecode.com/svn/trunk
  3. Call Gclient. Bat Sync -- Force
  4. Set gyp_generators=MSVs
  5. Call python src/webrtc/build/GYP_WEBRTC -G msvs_version=

Save, and then double-click Execute. Then there was a long wait, and in the case of 10MB broadband I waited 3 hours. The console will always show still working on SRC, in fact, there are several G things waiting to be downloaded. The official website's description is enough to confuse people, and this script should simplify the problem to the greatest extent.

Note that the last sentence in the script means the build vs compilation file (. sln), which triggers gclient to automatically download the vs2013 Express version of the core file, so there is no need for the original installed VS on the host machine.

After the script has finished running, there should be many files and directories in the SRC directory, including All.sln.

Compiling and downloading DirectX development packages

DirectX SDK June http://www.microsoft.com/en-us/download/details.aspx?id=6812, unzip the backup.

Compiling with VS2013 (not recommended)

Double-click All.sln to open, add include:dxsdk\include and library:dxsdk\lib;depot_tools\win_toolchain\vs2013_files\wdk\lib\ for each submodule Atl\amd64.

Because the modules are very, very many, they are not recommended.

Compiling with Ninja

Ninja is a build system developed by the chromium community, don't be afraid of unfamiliar ninja, and soon you'll fall in love with it and get bored with the VS heart.

The DirectX SDK will still be taken care of before compiling, this time copying dxsdk\include directly to Depot_tools\win_toolchain\vs2013_files\vc\include,dxsdk\lib to Depot_ Tools\win_toolchain\vs2013_files\vc\lib. This is simple and rough, convenient and efficient.

With ninja compiling, I also provide a handy script:

    1. @Echo Off
    2. :: HANKCS
    3. Title Hankcs' s program
    4. cd\
    5. %~d0
    6. CD%~dp0
    7. Set path=[your Depot_tools path, such as c:\depot_tools];%path%
    8. Del Ninjia.log
    9. Ninja-c out/release >> Ninjia.log

Save as bat and put it in the WEBRTC\SRC directory to execute.

If you encounter an error similar to the following:

    1. Error c2220: warning treated as error - no ' object ' file generated
    2. ...
    3. ' UTF8 ' codec can' t decode byte 0xd1 in position 0:invalid continuation byte

In Control Panel, modify the language as shown in:

Then run again and you'll find that the error c2220 magically disappears.

Run

If all goes well, there will be four folders under Webrtc\src\out,

Indicates that the compilation was successful.

After compiling, I want to say, his Niang compilation is so troublesome, do this thing how hard ah, the gap between people really his Niang big.

Reference

http://www.webrtc.org/reference/getting-started

http://egamesir.blog.163.com/blog/static/188096088201362411524585/

http://blog.csdn.net/choday/article/details/19978427

Compiling WEBRTC under Windows

Related Article

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.