主题:关于fortran 77 的编译问题
zxq_tx
[专家分:0] 发布于 2011-11-17 09:14:00
97年用FORTRAN77编译过程序 现在重新修正 遇到问题,请各位指点:1、一共5个程序块,FOR1,PAS2,都通过,LINK 后为何不见.exe 可执行文件生成。
回复列表 (共20个回复)
沙发
臭石头雪球 [专家分:23030] 发布于 2011-11-17 11:01:00
这个得看您用什么编译器?如何编译链接的?是否给出了 out 的路径和文件名?是否收到错误提示?
板凳
zxq_tx [专家分:0] 发布于 2011-11-17 13:27:00
比较早版的fortran77 编辑器,以前在dos状态下运行的,源程序用edit编辑,用for1,pas2,编译,单个程序是可生成可执行文件的。问题是我现在是五个程序模块,还有常数,都是以前编译通过的文件,现在只作了局部调整,有 输入数据文件 指定output文件输出 应该生成带参数的可执行文件,是不是编辑器少了什么文件?
我看了下fortran3.3 有点类似
库文件:8087.lib,altmath.lib,fortran.lib,math.lib
edlin.com
double.exe,for1.exe,pas2.exe,link.exe
3 楼
cgl_lgs [专家分:21040] 发布于 2011-11-17 16:28:00
楼主还是把你自己输入的命令和命令输出的提示都贴出来吧,可能是使用错误也可能是对当前路径的权限不足~~~~
4 楼
zxq_tx [专家分:0] 发布于 2011-12-12 17:56:00
5个块集成为一个文件,编译完link 提示:out of memory,有人说 00前的程序和编辑器在目前的配置下不能使用,这说法对吗?
5 楼
臭石头雪球 [专家分:23030] 发布于 2011-12-13 08:28:00
那可能是早期的16位编译器不支持那么大的内存使用量。
建议更换为32位编译器
6 楼
zxq_tx [专家分:0] 发布于 2011-12-13 17:36:00
下了个fortran90 试用中,原来77中通过的程序,在这错误一大把 :
CALCULATE THE UNIT LEAKAGE MAGNETIC CONDUCTANAE OF SPECIAL
!c FORM SLOTS-2
function slt2(b1,b2,h,s2)
real kr1
de=b1/b2
dg=1-de
slt2=kr1(dg,de)*b2*h**3/s2/s2
return
end
error FOR3470: too many END statements or duplicate program unit name SLT2 detected between SLT2 and (
CALCULATE THE STATOR LEAKAGE REACTANCE AND RESISTANCE
subroutine rxs(zf,s1,a,czn,l,mu)
implicit real(i,l,k)
real mu
common /bl4/pi,p,/bl6/b01,bc02,bo2,/bl7/bs1,bs2,/bl8/zs1,hs0,hs1, &
hs2,hs12,/bl9/rs,hs,/bl17/ikw,zkw,/bl18/ft,cx,h2,/bl19 &
/lo1,lo2,/bl21/kd,kp,kdp,ku,kl,h1,q11,/bl26/g,kfe,/bl27/ &
hw,si,/sb3/tp,ge,/sb6/leff,l1,l2,/sb13/ty,d,fd,lz,/sb16/ &
spu1,spl1,sp1,xs1,xd1,xe1,/sb17/r1,rr1,/sb18/x1,x2,x
spu1=hs0/b01+2.*hs1/(b01+bs1)
if (bs1.eq.bs2) spu1=spu1+(hw+si-hs1)/bs1
if (mu.gt.1) then
da=sqrt(5*g*mu)
db=bs1-0.5
dc=exp(db/da)+1
de=exp(db/da/2.)
df=1+mu*0.25/da
spu1=da*de/g/(dc*df-2)
endif
da=kdp*kdp
db=da*leff
de=(lz-l-0.64*ty)/db
if (bs1.eq.bs2) then
spl1=(hs-hs0-hw-si)/bs1/3.
elseif (rs.eq.0) then
spl1=sl(1.0,bs1,bs2,hs2)
else
spl1=sl(2.0,bs1,bs2,hs2)
endif
sp1=ku*spu1+kl*spl1
xs1=sp1*l1/q11/db
xd1=tp/ge/3.29*h1/ft/da
if (czn.eq.2) then
xe1=1.2*(d+0.5*fd)/leff
elseif (q11.eq.3) then
xe1=0.67*de
elseif (p.eq.2) then
xe1=0.47*de
else
xe1=0.2*(lz-l)/db
endif
x1=(xe1+xd1+xs1)*cx
rr1=lo1*lz*zf/a/s1/1e3
r1=rr1/zkw
return
end
error FOR3470: too many END statements or duplicate program unit name RXS detected between RXS and (
这俩错还可能是格式错
下面这个don't know why
format (3x,'* ','Eff1=',f5.4,3x,'Pf1='f5.4,3x,'Ist1=',f4.2,3x, &
error FOR2934: lexical error: Invalid character
7 楼
yeg001 [专家分:14390] 发布于 2011-12-14 00:13:00
什么90编译器? 错误提示怎么这么简单?
8 楼
zxq_tx [专家分:0] 发布于 2011-12-14 10:06:00
重新装了个 Microsoft_Fortran_PowerStation_4[].0 , 五个程序块和一个记事本的常数文件, 单个compile rs1改错后,提示
warning FOR4265: symbol E referenced but not set
warning FOR4265: symbol AT2 referenced but not set
warning FOR4265: symbol AT3 referenced but not set
warning FOR4265: symbol AT1 referenced but not set
RS1.OBJ - 0 error(s), 4 warning(s)
rs2改错后,提示:
Compiling Fortran...
RS2.OBJ - 0 error(s), 0 warning(s)
rs3改错后,提示:
warning FOR4265: symbol HR0 referenced but not set
warning FOR4265: symbol JC referenced but not set
RS3.OBJ - 0 error(s), 2 warning(s)
rs4改错后,提示:
Compiling Fortran...
D:\js\RS4.FOR
RS4.OBJ - 0 error(s), 0 warning(s)
rs5改错后,提示:
Compiling Fortran...
D:\js\RS5.FOR
D:\js\RS5.FOR(76): warning FOR4269: unused dummy argument NK
D:\js\RS5.FOR(306): warning FOR4269: unused dummy argument NK
D:\js\RS5.FOR(337): warning FOR4265: symbol HRR referenced but not set
D:\js\RS5.FOR(337): warning FOR4265: symbol LE referenced but not set
D:\js\RS5.FOR(337): warning FOR4269: unused dummy argument LEL
D:\js\RS5.FOR(337): warning FOR4269: unused dummy argument HRL
D:\js\RS5.FOR(337): warning FOR4280: unused local variable STAR1
RS5.OBJ - 0 error(s), 7 warning(s)
9 楼
zxq_tx [专家分:0] 发布于 2011-12-14 10:13:00
忽略警告连编译
Compiling Fortran...
D:\js\RS5.FOR
D:\js\RS5.FOR(76): warning FOR4269: unused dummy argument NK
D:\js\RS5.FOR(306): warning FOR4269: unused dummy argument NK
D:\js\RS5.FOR(337): warning FOR4265: symbol HRR referenced but not set
D:\js\RS5.FOR(337): warning FOR4265: symbol LE referenced but not set
D:\js\RS5.FOR(337): warning FOR4269: unused dummy argument LEL
D:\js\RS5.FOR(337): warning FOR4269: unused dummy argument HRL
D:\js\RS5.FOR(337): warning FOR4280: unused local variable STAR1
D:\js\RS4.FOR
D:\js\RS3.FOR
D:\js\RS3.FOR(222): warning FOR4265: symbol HR0 referenced but not set
D:\js\RS3.FOR(658): warning FOR4265: symbol JC referenced but not set
D:\js\RS2.FOR
D:\js\RS1.FOR
D:\js\RS1.FOR(296): warning FOR4265: symbol E referenced but not set
D:\js\RS1.FOR(296): warning FOR4265: symbol AT2 referenced but not set
D:\js\RS1.FOR(296): warning FOR4265: symbol AT3 referenced but not set
D:\js\RS1.FOR(296): warning FOR4265: symbol AT1 referenced but not set
Linking...
Error spawning link.exe
RS1.exe - 1 error(s), 13 warning(s)
10 楼
yeg001 [专家分:14390] 发布于 2011-12-14 10:23:00
请不要用PowerStation 4.0 原因请看置顶帖FAQ. 换个新一点编译器.
我来回复