Fortran Coder

查看: 12409|回复: 4
打印 上一主题 下一主题

[绘图界面库] dislin的测试程序

[复制链接]

13

帖子

5

主题

0

精华

入门

F 币
75 元
贡献
39 点
跳转到指定楼层
楼主
发表于 2018-4-19 17:14:40 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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, 下载次数: 248)

Image 1.png
分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

798

帖子

2

主题

0

精华

大宗师

F 币
3793 元
贡献
2268 点
沙发
发表于 2018-4-19 18:59:35 | 只看该作者

13

帖子

5

主题

0

精华

入门

F 币
75 元
贡献
39 点
板凳
 楼主| 发表于 2018-4-20 15:57:35 | 只看该作者
测试程序可以运行,但是没有图出来
于是我换了一个简单点的测试程序:
[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, 下载次数: 257)

dislin00.png

130

帖子

10

主题

0

精华

大师

F 币
617 元
贡献
372 点

贡献勋章管理勋章帅哥勋章元老勋章星光勋章规矩勋章

地板
发表于 2018-4-28 11:49:36 | 只看该作者
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

954

帖子

0

主题

0

精华

大师

F 币
184 元
贡献
75 点

规矩勋章元老勋章新人勋章水王勋章热心勋章

QQ
5#
发表于 2018-4-28 12:47:48 | 只看该作者
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
吗?
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-4-25 11:32

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表