24小时热门版块排行榜    

Znn3bq.jpeg
查看: 1148  |  回复: 2

anankity

新虫 (初入文坛)

[求助] Fortran编写子程序调试错误dfor.】 unresolved external symbol _MAIN__

如题,用Fortran语言编写子程序,调试时出现两个错误。
dfor.lib(DFORMAIN.OBJ) : error LNK2001: unresolved external symbol _MAIN__
Debug/URPFLO.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

URPFLO.exe - 2 error(s), 0 warning(s)
附上我的程序。。。。
subroutine urpflo(mdum,nn,kcus,matus,inc,ndi,ngeiis,ncrd,nstat,
     1                           cptim,timinc,ebar,erate,dt,dtdl,stats,dsta,
     2                                           coord,yd)

c**************************************************************************************************************************
c      mdum= element number
c      nn= integration point number
c      kcus(1)= layer number
c      kcus(2)= internal layer number
c      matus(l) = user material set number
c      matus(2) = internal material set number
c      inc= increment number
c      ndi= number of direct components
c      ngens= total number of components
c      nstat= number of state variables excluding temperature
c      cptim= time at beginning of increment
c      timinc = incremental time
c      dt= temperature at beginning of increment
c      dtdl= incremental temperature
c      ebar= total equivalent strain at beginning of increment
c      stats= values of state variables excluding temperature at beginning of increment
c      erate= equivalent strain rate
c       stats= array of state variables (excluding temperature)
c      at beginning of increment
c      coord= integration point coordinates
c      to be passed back:
c      yd= equivalent stress; if not calculated here,program will
c      find the value of yd from the input data
c      dstats = incremental state variables (excluding temperature)
c******************************************************************************
c    ** Start of generated type statements **
      real*8 coord, cptim,dstats, dt, dtdl,ebar, erate
      integer inc, kcus, matus, mdum, nerd, ndi, ngens, nn,nstat
      real*8 stats, timinc, yd
c    ** End of generated type statements **
      dimension mdum(2),stats(nstat),dstats(nstat),coord(ncrd),matus(2),
     * kcus(2)
      real*8 peakstrain,peakstress,stresstemp
      peakstrain=0.001*erate**0.0422*exp(2108.5/(dt+273.15))
      stresstemp=180.734*exp(-0.733*(dt/300-1))*(erate/10)**(-0.012+
     +0.043*dt/300)
      if(ebar.LE.peakstrain) then
       peakstress=stresstemp*(1.048*(peakstrain/0.2)**(0.243-0.128*
     +dt/300)-0.048*peakstrain/0.2)
      yd=ebar*peakstress/peakstrain*(2-ebar/peakstrain)
      else
      yd=stresstemp*(1.048*(ebar/0.2)**(0.243-0.128*dt/300)-0.048*ebar
     +/0.2)
      end if
      return
      end
求高手们帮忙解决。。。小弟感激不尽!!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

virtualzx

木虫 (著名写手)

【答案】应助回帖

感谢参与,应助指数 +1
没有主程序不能link成可执行文件,要么做成库,要么写一个主程序(program xxxxx  / end program)
2楼2013-09-19 10:07:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

anankity

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by virtualzx at 2013-09-19 10:07:05
没有主程序不能link成可执行文件,要么做成库,要么写一个主程序(program xxxxx  / end program)

我是用Marc作温度场模拟时需要一个子程序,其实我不怎么懂Fortran语言。以前看文献是直接编写好子程序插入到Marc中就可以,而我在插入子程序之后Marc的退出号为3,不知道改如何解决啊??
3楼2013-09-22 10:02:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 anankity 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 1rx34o113h 2026-05-23 3/150 2026-05-24 17:41 by 0i3mu4vkjz
[基金申请] 评审有感 +16 popular289 2026-05-18 27/1350 2026-05-24 17:34 by hhs666
[教师之家] 论文撤稿了 +4 bjvtcliu 2026-05-24 7/350 2026-05-24 17:29 by bjvtcliu
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 hvkbtfonbv 2026-05-23 4/200 2026-05-24 17:21 by 75ui6h7z2t
[博后之家] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 hvkbtfonbv 2026-05-23 3/150 2026-05-24 17:10 by 75ui6h7z2t
[考博] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 hvkbtfonbv 2026-05-23 3/150 2026-05-24 17:01 by 75ui6h7z2t
[考研] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +3 a2tycdlnq1 2026-05-23 5/250 2026-05-24 16:21 by hhx1yx9evi
[基金申请] 河北省自然科学基金 +6 Peterchao 2026-05-18 9/450 2026-05-24 16:02 by 130067131
[硕博家园] 售SCI一区T0P文章,我:8.O.5.5.1.O.5.4,科目齐全,可+急 +4 pmo95bazuy 2026-05-23 8/400 2026-05-24 15:56 by 1uy1ht2y9r
[基金申请] 西安交大新媒学院副院长用撤稿论文结题 +3 bjvtcliu 2026-05-24 5/250 2026-05-24 10:16 by kudofaye
[教师之家] 某211大学教师把个人教师官方主页改成:我跑了我跑了我跑了!官宣跑路! +4 zju2000 2026-05-21 5/250 2026-05-24 09:35 by songwz
[考博] 26/27申博自荐 10+4 ZXW0202 2026-05-22 9/450 2026-05-24 08:47 by bjvtcliu
[基金申请] 青B发送上会通知了吗 +5 chemBioBro 2026-05-22 7/350 2026-05-23 12:35 by zhuifengzhy
[考博] 博士申请 +3 焦晓明 2026-05-21 3/150 2026-05-23 11:26 by mlc840311
[论文投稿] 投稿求助,期刊 +4 希冀,有书读 2026-05-20 8/400 2026-05-22 10:16 by 希冀,有书读
[文学芳草园] 献血感触 +7 呀呀好傻 2026-05-19 13/650 2026-05-21 20:15 by 呀呀好傻
[基金申请] 国自然评分 +4 无名者登山 2026-05-20 5/250 2026-05-21 16:35 by swuq
[有机交流] 反应很差,大量原料没有反应 5+3 Mr.Zot 2026-05-19 8/400 2026-05-20 22:19 by Equinoxhua
[考博] 如果工作了想读博,可以边工作边读全日制嘛? 30+3 铁达火车 2026-05-18 5/250 2026-05-20 09:33 by tfang
[考博] 博士申请 +5 星…… 2026-05-18 6/300 2026-05-18 23:49 by 糊糊涂涂好
信息提示
请填处理意见