WebRTC系列 - 源码编译等

##一,本地分支查看问题

  1. 首先进入代码的SRC目录下,执行GIT中分支查看本机代码所在的GIT中分支,会发现一般有两个(一个是版本号的,另一个主),代码所在的分支就是在带版本号的目录下;
      //更新源码
     cd src
     git pull
     gclinet sync
  1. 出现xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instanceTraceback (most recent call last):
    解决:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  2. 同步代码出现
Error: 14> 
14> ____ src/buildtools/third_party/libc++/trunk at e713cc0acf1ae8b82f451bf58ebef67a46ceddfb
14> 	You have unstaged changes.
14> 	Please commit, stash, or reset.
解决: gclient sync -f

5: 运行gclient sync,提示錯誤,client not configured see 'gclient config',需要生成.gclient的配置文件,

gclient config https://webrtc.googlesource.com/src.git
//or
从其他webrtc源码中和“SRC/”平级目录下cp;如下图

gClient  sync出错解决1

二,获取最新分支代码

1. 切换回master

cd 到src目录
执行:git remote
执行:git checkout master
执行: git pull
等待获取最新代码
  1. 切换到最新分支
执行上面步骤1后:
cd src
git branch -r //查看远程分支
git checkout <branch_name> //例如:git checkout branch-heads/50
gclient sync

猜你喜欢

转载自blog.csdn.net/lym594887256/article/details/79412148