安装这的方法挺多的,一种就是去https://anttweakbar.sourceforge.net/doc/ 上下载zip包,然后解压,转至src目录下进行make,但这种方法奇怪的是仍然不能安装成功,编译需要AntTweakBar的程序时仍旧报错,比如报could NOT find ANTTWEAKBAR的错误
这个时候,分享一个我自己能成功的解决方案,在src文件夹下使用这些命令,知道原理的友友们欢迎在评论区分享下哟
sed -i "s/LINK = gcc/LINK = g++/" Makefile
make
sudo mv ../lib/libAntTweakBar.so /usr/lib/
sudo mv ../lib/libAntTweakBar.so.1 /usr/lib/
sudo mv ../include/* /usr/include/
完整安装命令就在下面咯
wget -O AntTweakBar_116.zip http://sourceforge.net/projects/anttweakbar/files/latest/download?source=dlp
unzip AntTweakBar_116.zip
cd AntTweakBar/src
# And as it uses C++ ... we need to link with g++, but this Makefile's version doesn't !
# So we modify the makefile with sed !
sed -i "s/LINK = gcc/LINK = g++/" Makefile
make
sudo mv ../lib/libAntTweakBar.so /usr/lib/
sudo mv ../lib/libAntTweakBar.so.1 /usr/lib/
sudo mv ../include/* /usr/include/
cd ../../
rm -rf AntTweakBar_116.zip
rm -rf AntTweakBar
参考自:https://github.com/rougier/freetype-gl/blob/master/.travis.yml#L27