Fortran Coder

标题: 运算中出现不解提示,求助01 [打印本页]

作者: PotsyYZhou    时间: 2022-10-28 16:47
标题: 运算中出现不解提示,求助01
运算中出现不解提示,求助01
***********************
[Fortran] 纯文本查看 复制代码
function r8_log_10 ( x )

!c*********************************************************************72
!c
!cc R8_LOG_10 returns the logarithm base 10 of an R8.
!c
!c  Discussion:
!c
!c    value = Log10 ( |X| )
!c
!c  Parameters:
!c
!c    Input, double precision X, the number whose base 2 logarithm is desired.
!c    X should not be 0.
!c
!c    Output, double precision R8_LOG_10, the logarithm base 10 of the absolute
!c    value of X.  It should be true that |X| = 10**R_LOG_10.
!c
      implicit none

      double precision r8_huge
      double precision r8_log_10
      double precision x

      if ( x .eq. 0.0D+00 ) then
#7492 |     r8_log_10 = - r8_huge ( x )
      else
        r8_log_10 = log10 ( abs ( x ) )
      end if

      return
      end
********************************
main.f90:7492:29: 7492 |         r8_log_10 = - r8_huge ( x )      |                             1Warning: More actual than formal arguments in procedure call at (1)/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test07_':main.f90:(.text+0x1b015): undefined reference to `r8_uniform_'/usr/bin/ld: main.f90:(.text+0x1b04f): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test03_':main.f90:(.text+0x1cddc): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test02_':main.f90:(.text+0x1d745): undefined reference to `r8_uniform_'/usr/bin/ld: main.f90:(.text+0x1d765): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o:main.f90:(.text+0x1dcbc): more undefined references to `r8_uniform_' followcollect2: error: ld returned 1 exit status
#7492????
   不解。及下面内容的意思,求助!
谢谢!

作者: 胡文刚    时间: 2022-10-28 17:22
你给出的部分代码无法判断这种"缺少函数"的问题。
作者: 风平老涡    时间: 2022-10-28 23:17
本帖最后由 风平老涡 于 2022-10-28 23:19 编辑

定义了r8_huge变量, 没有定义r8_huge(x) 函数。
作者: PotsyYZhou    时间: 2022-11-2 14:03
收到, 谢谢!




欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2