Fortran Coder

标题: dislin的测试程序 [打印本页]

作者: wdy    时间: 2018-4-19 17:14
标题: 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   -a  exa_c        (for icl)
                 DLINK   -a  exa_f77      (for ifort, Fortran 77)
                 F90LINK -a  exa_f90      (for ifort, Fortran 90/95)
     and
                 CLINK   -a  map_c        (for icl)
                 DLINK   -a  map_f77      (for ifort, Fortran 77)
                 F90LINK -a  map_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   -a  exa_f77以后,却报错
LINK : fatal error LNK1181: 无法打开输入文件“\disifl.lib”.
disifl.lib文件就在C:\dislin文件夹下啊,有没有解决办法?

Image 1.png (27.51 KB, 下载次数: 251)

Image 1.png

作者: li913    时间: 2018-4-19 18:59
http://bbs.fcode.cn/forum.php?mo ... 52&highlight=dislin注意区分32和64位。

作者: wdy    时间: 2018-4-20 15:57
测试程序可以运行,但是没有图出来
于是我换了一个简单点的测试程序:
[Fortran] 纯文本查看 复制代码
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函数库的,问题是现在不确定它是链接到哪里的(通过了编译),这个问题有没有人解决过?


dislin00.png (2.68 KB, 下载次数: 260)

dislin00.png

作者: chiangtp    时间: 2018-4-28 11:49
wdy 发表于 2018-4-20 15:57
测试程序可以运行,但是没有图出来
于是我换了一个简单点的测试程序:
[mw_shl_code=fortran,true]progr ...

1. [查找原因发现dislin中的一些函数是空函数]: 不是這個問題

2. [可以编译运行,还是没有图出来]: "编译", "运行"時, 都沒有 "warn/error"訊息???
    "运行"結束, 可有 [END OF DISLIN / VERSION ...]訊息

3. 請試用 UNIF90:  支援 WIN-32 DISLIN
    http://fcode.cn/resource_compiler-34-1.html
作者: vvt    时间: 2018-4-28 12:47
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
吗?




欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2