./SPHYSICSgen_gfortran.mak: line 1: $'-O3\r': command not found
./SPHYSICSgen_gfortran.mak: line 2: srcdir: command not found
./SPHYSICSgen_gfortran.mak: line 5: $'external_file.o\r': command not found
./SPHYSICSgen_gfortran.mak: line 7: objects: command not found
./SPHYSICSgen_gfortran.mak: line 7: SPHYSICSgen:: command not found
./SPHYSICSgen_gfortran.mak: line 8: FC: command not found
./SPHYSICSgen_gfortran.mak: line 8: srcdir: command not found
./SPHYSICSgen_gfortran.mak: line 8: objects: command not found
./SPHYSICSgen_gfortran.mak: line 8: -o: command not found
./SPHYSICSgen_gfortran.mak: line 33: syntax error: unexpected end of file
上面这个是运行了主函数报错的,我觉得是不是我的gfortran没有装好?因为前面我运行是没有问题的,但是后面的时候就有问题了,我觉得肯定有问题,但是中途我只是试图安装了一个matlab,什么也没做,他就这样了。
./gfortran_version_check.bat: line 9: [: -ge: unary operator expected
gfortran version too old
Minimum gfortran version > 4.3 required
UPDATE your gfortran
./gfortran_version_check.bat: line 29: return: can only `return' from a function or sourced script
这个是报错报的最狠的一个函数(上面的程序调用了的),怎么搞他都不给我面子,我卸载重装,绑定头文件,甚至强行改程序让之成功。网上有说,是gfortran版本问题,高版本区别对待数字和文本,判断我的版本
gfortran4.7
是一个文本文件,当然不会比4.3大,然后我就跪了,这程序怎么就跑不通,报错是反馈的什么有问题,不是很懂。
[Fortran] 纯文本查看 复制代码 FC=gfortran -O3
srcdir = .
idir=../../execs
bakdir=../../execs.bak
objects=SPHYSICSgen_2D.o \
#
SPHYSICSgen: $(objects)
$(FC) -o SPHYSICSgen_2D $(srcdir)/$(objects)
#
if [ -d $(bakdir) ]; then \
echo execs.bak Directory Exists; else \
mkdir $(bakdir); \
echo execs.bak Directory Created; \
fi
#
if [ -d $(idir) ]; then \
echo execs Directory Exists; else \
mkdir $(idir); \
echo execs Directory Created; \
fi
#
if [ -f $(idir)/SPHYSICSgen_2D ]; then \
mv $(idir)/SPHYSICSgen_2D $(bakdir)/; \
echo Old SPHYSICSgen_2D moved to execs.bak from execs; \
fi
#
mv SPHYSICSgen_2D $(idir)
echo New SPHYSICSgen_2D moved to execs
#
clean :
rm *.o
感激不尽!
|