Ubuntu16.04下编译安装arcsim-0.3.1

以下为Ubuntu16.04编译arcsim-0.3.1的详细步骤:

  1. 安装编程套件(主要是g++):

    sudo apt-get install build-essential
    
  2. 安装vimctags

    sudo apt-get install vim
    sudo apt-get install ctags
    
  3. 更新apt-get

    sudo apt-get update
    
  4. 下载arcsim 0.3.1http://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
    
  14. 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
    
  15. 删除darwin(*不删除下面编译会报错)

    rm -r dependencies/taucs/build/darwin/
    
  16. cd dependencies
    make
    
  17. 第二次键入make,输出以下信息,说明运行成功:

    lxh@ubuntu:~/Downloads/arcsim-0.3.1/dependencies$ make
    make: Nothing to be done for 'all'.
    
  18. 返回根目录/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
    

    则编译成功!

  19. 测试:

    ./bin/arcsim simulate conf/sphere.json
    

    按下空格键开始模拟。

    效果图:

posted @ 2021-11-17 16:32  国名老公阿航  阅读(154)  评论(0编辑  收藏  举报