It's our wits that make us men.

慧极必伤,情深不寿,强极则辱,谦谦君子,温润如玉

vpdetection project

Posted on By hejw005

original vplines in original

this figure was generated by the project of https://github.com/simbaforrest/vpdetection

However, this project needs gcc 4.7.x.

Install gcc 4.7.x and g++ 4.7.x on Ubuntu

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

sudo  apt-get update

sudo apt-get  install gcc-4.7

sudo apt-get  install g++-4.7

**assign the priority for gcc**

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 50

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 40

sudo update-alternatives --config gcc

Then, we can see

选择 路径 优先级 状态
* 0 /usr/bin/gcc-4.7 50 自动模式
1 /usr/bin/gcc-4.7 50 手动模式
2 /usr/bin/gcc-4.8 40 手动模式

要维持当前值[*]请按回车键,或者键入选择的编号:

要想用哪个gcc就输入编号吧。

同样也要设置一下g++的

sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-4.7 50

sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-5 40

如果想删除可选项的话可以键入以下指令:

sudo update-alternatives –remove gcc /usr/bin/gcc-4.7

再用gcc -v 来看一下版本是否改变了。