- A+
所属分类:教程
以下为Ubuntu16.04编译arcsim-0.3.1的详细步骤:
1.安装编程套件(主要是g++
):
sudo apt-get install build-essential
2.安装vim
和ctags
:
sudo apt-get install vim
sudo apt-get install ctags
3.更新apt-get
:
sudo apt-get update
4.下载arcsim 0.3.1
:http://graphics.berkeley.edu/resources/ARCSim/arcsim-0.3.1.tar.gz
5.解压包:
tar zxvf arcsim-0.3.1.tar.gz
cd arcsim-0.3.1
6.将Makefile.linux
文件重命名为Makefile
:
mv Makefile.linux Makefile
7.安装BLAS
:
sudo apt-get install libatlas-base-dev
sudo apt-get install libopenblas-dev
8.安装Boost
:
sudo apt-get install libboost-all-dev
9.安装freeglut
:
sudo apt-get install freeglut3-dev
10.安装gfortran
:
sudo apt-get install gfortran
11.安装LAPACK
:
sudo apt-get install liblapack3
sudo apt-get install liblapack-dev
12.安装libpng
:
sudo apt-get install libpng-dev
sudo apt-get install libpng++-dev
13.安装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
14.删除darwin
(*不删除下面编译会报错)
rm -r dependencies/taucs/build/darwin/
cd dependencies
make
15.第二次键入make
,输出以下信息,说明运行成功:
lxh@ubuntu:~/Downloads/arcsim-0.3.1/dependencies$ make
make: Nothing to be done for 'all'.
16.返回根目录/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
则编译成功!
17.测试:
./bin/arcsim simulate conf/sphere.json
按下空格键
开始模拟。
效果图: