Fortran Coder

查看: 8146|回复: 6
打印 上一主题 下一主题

求助一个有关Fortran动态链接库的问题

[复制链接]

4

帖子

1

主题

0

精华

入门

F 币
42 元
贡献
20 点
跳转到指定楼层
楼主
发表于 2021-4-14 19:38:20 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
5F 币
有一款仿真软件是使用如下方法进行二次开发的:
file:///C:\Users\XIAOJIANJJJ\Documents\Tencent Files\1429709479\Image\C2C\HTLG$2G3BL_EZRW)25~R4IJ.png1. Implement an equation for wear rate within the FORTRAN subroutine and save it as UserWearModel.fNote: A sample UserWearModel.f exists within the advanteng bin.
2. Compile the subroutine to a *.dll file by typing the following command into the Intel FORTRAN COMPILER:
>ifort /DLL /libs:static /threads UserWearModel.f
3. If necessary, rename the *.dll file as UserWearModel.dll
4. Replace any existing UserWearModel.dll file located in the advanteng bin with the new
UserWearModel.dll
5. Create a simulation

我按照这个用VS+IVF进行编译之后,替换掉原来的.dll文件之后,发现仿真软件无法正确使用了。还有就是软件自带的.dll文件只有8kb,而我编译的确有17.5kb,文件代码如下
c     User Defined Tool Wear Subroutine
c     Version 4.4-006
c     Copyright Third Wave Systems, Inc 2003
c     7900 West 78th Street - Suite 250
c     Edina, MN 55439
c     1.952.832.5515
c
      SUBROUTINE WEARMODEL_USER(wdot,pressure,velocity,temperature,
     1            uwearpar)
c
!DEC$ ATTRIBUTES DLLEXPORT :: WEARMODEL_USER
      implicit real*8 (a-h,o-z)
      real*8 uwearpar(10)
c
c uwearpar(10) is cutting velocity unless user assigns number.
c
c Usui's Model
c
      wdot=pressure*velocity*uwearpar(1)
     1     *exp(-uwearpar(2)/(temperature+273.15))
c
      return
      end

科研任务十分紧迫,我还是个新手,对动态链接库不是特别懂,希望有大佬指点!!!
分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

4

帖子

1

主题

0

精华

入门

F 币
42 元
贡献
20 点
沙发
 楼主| 发表于 2021-4-16 16:49:56 | 显示全部楼层
替代了之后,没有错误提示,仿真软件直接点simulation,无任何反应,简单来说就是仿真软件无法正常工作了
回复

使用道具 举报

4

帖子

1

主题

0

精华

入门

F 币
42 元
贡献
20 点
板凳
 楼主| 发表于 2021-4-17 13:31:15 | 显示全部楼层
我下载的 Dependency walker怎么打不开DLL文件
回复

使用道具 举报

4

帖子

1

主题

0

精华

入门

F 币
42 元
贡献
20 点
地板
 楼主| 发表于 2021-4-18 19:32:25 | 显示全部楼层
依赖项有这个msvcr90.dll文件是什么意思
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

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

GMT+8, 2024-5-7 02:51

Powered by Tencent X3.4

© 2013-2024 Tencent

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