2017-09-03 128 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\ 

請註明,如果它的工作

相關問題