Ubuntu16.04下编译安装arcsim-0.3.1
以下为Ubuntu16.04编译arcsim-0.3.1的详细步骤:
-
安装编程套件(主要是
g++
):sudo apt-get install build-essential
-
安装
vim
和ctags
:sudo apt-get install vim sudo apt-get install ctags
-
更新
apt-get
:sudo apt-get update
-
下载
arcsim 0.3.1
:http://graphics.berkeley.edu/resources/ARCSim/arcsim-0.3.1.tar.gz -
解压包:
tar zxvf arcsim-0.3.1.tar.gz cd arcsim-0.3.1
-
将
Makefile.linux
文件重命名为Makefile
:mv Makefile.linux Makefile
-
安装
BLAS
:sudo apt-get install libatlas-base-dev sudo apt-get install libopenblas-dev
-
安装
Boost
:sudo apt-get install libboost-all-dev
-
安装
freeglut
:sudo apt-get install freeglut3-dev
-
安装
gfortran
:sudo apt-get install gfortran
-
安装
LAPACK
:sudo apt-get install liblapack3 sudo apt-get install liblapack-dev
-
安装
libpng
:sudo apt-get install libpng-dev sudo apt-get install libpng++-dev
-
安装
scons
:sudo apt-get install scons
-
sudo apt-get install gcc make g++ libboost-all-dev freeglut3-dev \ gfortran liblapacke-dev libpng-dev libpng++-dev scons \ libatlas-base-dev ctags libopenblas-dev
-
删除
darwin
(*不删除下面编译会报错)rm -r dependencies/taucs/build/darwin/
-
cd dependencies make
-
第二次键入
make
,输出以下信息,说明运行成功:lxh@ubuntu:~/Downloads/arcsim-0.3.1/dependencies$ make make: Nothing to be done for 'all'.
-
返回根目录
/arcsim-0.3.1
,然后输入make
:cd .. make
运行完毕后,同样第二次键入
make
,如果得到输出:lxh@ubuntu:~/Downloads/arcsim-0.3.1$ make cd src; ctags -w *.?pp cd src; etags *.?pp
则编译成功!
-
测试:
./bin/arcsim simulate conf/sphere.json
按下
空格键
开始模拟。效果图: