2017-09-03 127 views
0

像这个问题一样WebRTC not building for Windows,我无法用VS 2015在Windows 7 64位上构建WebRTC,但问题不同。 gclient同步进展顺利没有错误。但是,当我运行GN根出/的WebRTC,然后我得到下面的错误WebRTC不适用于Windows

ERROR at //third_party/protobuf/proto_library.gni:229:15: File is not inside out 
put directory. 
    outputs = get_path_info(protogens, "abspath") 
       ^--------------------------------- 
The given file should be in the output directory. Normally you would specify 
"$target_out_dir/foo" or "$target_gen_dir/foo". I interpreted this as 
"//out/Default/gen/webrtc/rtc_tools/event_log_visualizer/chart.pb.h". 
See //webrtc/rtc_tools/BUILD.gn:184:3: whence it was called. 
    proto_library("chart_proto") { 
    ^----------------------------- 
See //BUILD.gn:16:5: which caused the file to be included. 
"//webrtc/rtc_tools", 
^------------------- 
Traceback (most recent call last): 
    File "D:/temp/webrtc-checkout/src/build/vs_toolchain.py", line 459, in <module> 
    sys.exit(main()) 
    File "D:/temp/webrtc-checkout/src/build/vs_toolchain.py", line 455, in main 
    return commands[sys.argv[1]](*sys.argv[2:]) 
    File "D:/temp/webrtc-checkout/src/build/vs_toolchain.py", line 431, in GetTool 
chainDir 
    win_sdk_dir = SetEnvironmentAndGetSDKDir() 
    File "D:/temp/webrtc-checkout/src/build/vs_toolchain.py", line 424, in SetEnvi 
ronmentAndGetSDKDir 
    return NormalizePath(os.environ['WINDOWSSDKDIR']) 
    File "D:\temp\depot_tools\win_tools-2_7_6_bin\python\bin\lib\os.py", line 423, 
in __getitem__ 
    return self.data[key.upper()] 
KeyError: 'WINDOWSSDKDIR' 

我尝试添加在上面的问题中提到的变量,但它并没有帮助。 任何帮助将不胜感激。

回答

0

您需要在环境变量(windows sdk)中设置LIB和INCLUDE。 并将PATH设置为正确版本的Python(我认为2.7.6)。

所以你envirnment变量应该是:

LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\ucrt\x64; 
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\x64 

INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared; 
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt; 
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\um; 
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\winrt 

PATH=C:\src\depot_tools\python276_bin\ 

请注明,如果它的工作

相关问题