操作系统下安装设置计划

时间:2021/09/06 04:25:55 编辑:

1,源文件:

2,解压缩到目录~/Desktop/pgplot/ (随便放哪了)

3,新建目录, 如果只是自己用的话那就~/pgplot/ ;如果想要所有用户都可以用的话,那就新建/usr/share/pgplot目录

4,开始编译:

$ cd /usr/share/pgplot/ #(安装在此目录)

$ cp ~Desktop/pgplot/st ./ #(拷贝源文件里面的st到安装目录)

$ vi st #(修改此文件,选取你想安装的driver)

##st文件里面选取这几个,把这几行前面的!去掉就可以了.

GIDRIV 1 /GIF GIF-format file, landscape

GIDRIV 2 /VGIF GIF-format file, portrait

NUDRIV 0 /NULL Null device (no output) Std F77

PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77

PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77

PSDRIV 3 /CPS PostScript printers, color, landscape Std F77

PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77

XWDRIV 1 /XWINDOW Workstations running X Window System C

XWDRIV 2 /XSERVE Persistent window on X Window System C

#################

$ sudo ~/Desktop/pgplo/makemake ~/Desktop/pgplot linux g77_gcc

####makemake 后面跟的参数分别是 源文件的目录, 什么操作系统 ,编译器compiler(此项缺损的时,makemake是会自动提示你有那些compilers可选) makemake完成了会有如下文件:

st

grexec.f

c

makefile

c

t

$ sudo make ###make完成了,接下来是设置.

5,环境设置...(Fortran bash shell)

把一下行直接拷贝到.bashrc文件中

PATH=/usr/share/pgplot/bin:$PATH

欢乐多一点;污染少一点 PGPLOT_DIR=/usr/share/pgplot/;export PGPLOT_DIR

LD_LIBRARY_PATH=/usr/share/pgplot/;export LD_LIBRARY

PGPLOT_FONT=/usr/share/pgplot/t ;export PGPLOT_FONT

PGPLOT_DEV=/xwin;export PGPLOT_DEV

PGPLOT_LIB=\"-L /usr/X11R6/lib -lX11 -L /usr/share/pgplot/ -lpgplot\";export PGPLOT_LIB

然后 $ source .bashrc(注:对其他的shell,可以google到以上命令的对应语句.比如如果你用的是c shell的话,可以把以上命令改成c shell格式的,并添加到.cshrc 文件中)。

6 编译文件命令: $ g77 filename.f $PGPLOT_LIB ####编译通过生成t可执行文件

#########或者 $g77 -o outname filename.f $PGPLOT_LIB ####编译通过生成outname可执行文件。

济南医院白癜风哪好
广东新标木门怎么样
广州宫颈糜烂哪家好