码迷,mamicode.com
首页 > 其他好文 > 详细

有关Fortran编译的一个错误

时间:2017-05-30 19:26:33      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:程序   truncate   function   ror   mit   今天   symbol   return   exit   

从来没有用过fortran, 今天有师弟让我帮忙跑一个fortran的程序, 我一编译就报如下错误

/tmp/ccy4yDLX.o: In function `output_‘:
Hjdk.for:(.text+0xc3): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0xfa): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x131): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x168): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x314): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x34b): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x382): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x3b9): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
/tmp/ccy4yDLX.o: In function `rk_‘:
Hjdk.for:(.text+0x653): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x663): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x809): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status

解决方案是在编译时加上参数设置 -mcmodel=medium 就可以

gfortran  a.for  -mcmodel=medium

 

有关Fortran编译的一个错误

标签:程序   truncate   function   ror   mit   今天   symbol   return   exit   

原文地址:http://www.cnblogs.com/catinlbb/p/6920770.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!