dislin的测试程序
本帖最后由 wdy 于 2018-4-19 17:26 编辑Plplot安装受阻以后,改装dislin,然后安装好dislin并设置好环境变量后,按照readme.txt中的步骤:
Now you can compile,link and run the example programs in the
DISLIN subdirectory examples with the commands
CLINK -aexa_c (for icl)
DLINK -aexa_f77 (for ifort, Fortran 77)
F90LINK -aexa_f90 (for ifort, Fortran 90/95)
and
CLINK -amap_c (for icl)
DLINK -amap_f77 (for ifort, Fortran 77)
F90LINK -amap_f90 (for ifort, Fortran 90/95)
Notes:
- The Dislin libraries disifl.lib and disifl_d.lib are compiled
with the option /MT (Multithreaded). If you want to link for
Multithreaded DLL runtime libraries (/MD), you can link with the
Dislin libraries disifd.lib or disifd_d.lib.
- This DISLIN distribution does not contain a pre-compiled
'dislin.mod' file for Fortran 90/95. Please compile the file
'dislin.f90' in the DISLIN\ifc and DISLIN\ifc\real64 directories
with the command ifort -c dislin.f90.
- CLINK, DLINK and F90LINK link by default with the single
precision library disifl.lib. A double precision version
of the library is also included (disifl_d.lib).
然而我在DLINK -aexa_f77以后,却报错
LINK : fatal error LNK1181: 无法打开输入文件“\disifl.lib”.
disifl.lib文件就在C:\dislin文件夹下啊,有没有解决办法?
http://bbs.fcode.cn/forum.php?mo ... 52&highlight=dislin注意区分32和64位。
测试程序可以运行,但是没有图出来:-L
于是我换了一个简单点的测试程序:
program main
use dislin
real x,y
dimension X(5),Y(5)
data x/1.0,2.0,3.0,4.0,5.0/
y=sin(x)
call metafl("cons")
call disini()
call color("red")
call graf(0.,6.,-1.,2.,-1.,1.,-1.,0.5)
call titlin("test",1)
call title()
call curve(x,y,5)
call disfin()
end
可以编译运行,还是没有图出来,查找原因发现dislin中的一些函数是空函数,比如上面用到的metafl()在dislin.f90中定义见下图。
这样的空函数很多,这些空函数应该是链接到*.lib函数库的,问题是现在不确定它是链接到哪里的(通过了编译),这个问题有没有人解决过?
wdy 发表于 2018-4-20 15:57
测试程序可以运行,但是没有图出来
于是我换了一个简单点的测试程序:
progr ...
1. [查找原因发现dislin中的一些函数是空函数]: 不是這個問題
2. [可以编译运行,还是没有图出来]: "编译", "运行"時, 都沒有 "warn/error"訊息???
"运行"結束, 可有 訊息
3. 請試用 UNIF90:支援 WIN-32 DISLIN
http://fcode.cn/resource_compiler-34-1.html dislin.f90 是接口代码,不是实现代码,都是空的。
(类似于C/C++的函数原型)
disifl.lib文件就在C:\dislin,那为何用
link exa_f77 -subsystem:console \disifl.lib gdi32.lib user32.lib
链接呢?
不应该用
link exa_f77 -subsystem:console \dislin\disifl.lib gdi32.lib user32.lib
吗?
页:
[1]