- 积分
- 16
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-7-30
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
應該不少人遇到這問題
ncargex cpex08
剛剛嘗試下有完成解決了,分享給各位試試看
環境是centos7+gfortran4.8.3
從網站https://www.centos.org/forums/viewtopic.php?f=47&t=48942
節錄這段
/usr/X11R6 as a separate hierarchy has gone many many years before. Nowadays these files are located directly in /usr, some are in /etc/X11 or /usr/share/X11. I have no idea about your legacy app, and what it is looking for.
So you just copied over /usr/X11R6 from Mint? No surprise this didn't work.
You first need to find out what your app is expecting to find there.
於是我嘗試把解壓包裏頭
/bin/ncargf77的代碼改了下
#*********************************************#
# #
# Make sure NCARG_ROOT is set for this script #
# #
#*********************************************#
.
.
.
#set syslibdir = "-L/usr/X11R6/lib64"
set syslibdir = "-L/usr/share/X11"
set xlib = "-lX11 -lXext"
set cairolib = "-lcairo -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lpthread -lXrender -lbz2"
set fortran = "gfortran"
set loadflags = "-fPIC -fno-second-underscore -fno-range-check -fopenmp -Wall -O "
set libdir = `ncargpath lib`
set ro = "$libdir/ncarg/robj"
set libpath = "-L$libdir $syslibdir"
不過有人建議把ncargcc/f77/f90 nhlcc/f77/f90 都改一改就是
有缺函數包的話參考下這裡
http://limisky.0fees.net/?p=256
在執行一次
[root@localhost bin]# ncargex cpex08
NCAR Graphics Fortran Example <cpex08>
Copying cpex08.f
Copying cpexcc.f
Compiling and linking...
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -Wall -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncl/lib -L/usr/share/X11 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lpthread -lXrender -lbz2
Executing <cpex08>...
PLOT TITLE WAS EXAMPLE 8
INTEGER WORKSPACE USED 120
REAL WORKSPACE USED 400
AREA MAP SPACE USED 93250
PLOT TITLE WAS EXAMPLE 8
INTEGER WORKSPACE USED 120
REAL WORKSPACE USED 400
AREA MAP SPACE USED 866064
Metafile file is named cpex08.ncgm.
便能得到 cpex08.ncgm.
最後下指令
ctrans -d X11 cpex08.ncgm
便能得圖啦
給各位參考
|
|