Fortran Coder

标题: 新人求助 使用mkl库失败,报错无法解析的外部符号 [打印本页]

作者: 千手斑    时间: 2019-5-13 17:34
标题: 新人求助 使用mkl库失败,报错无法解析的外部符号
我按照网上说的设置了Include和Lib路径,也更改了属性中的Additional Dependencies为mkl_lapack95.lib,Use Intel Math Kernel Library选择了Parallel,最终还是会报错无法解析的外部符号,不知道是什么原因?
[Fortran] 纯文本查看 复制代码
      include 'lapack.f90'
   
      program main
      
      use F95_PRECISION
      use LAPACK95
      
   
      integer,parameter::n=3
      integer i
      real(4)::a(n,n),b(n)
      integer ipiv(n)
      a=reshape([1,0,1,2,1,0,3,3,0],[n,n])
      b(:)=[14,11,1]
      call sgetrf(n,n,a,n,ipiv,i) !LU分解
      !call sgetrs( 'N', n, n, a, n, ipiv, b,n, i )
      end


作者: fcode    时间: 2019-5-13 18:24
求助最基本的错误提示都不给出来。
作者: 千手斑    时间: 2019-5-14 11:56
fcode 发表于 2019-5-13 18:24
求助最基本的错误提示都不给出来。

错误提示就是无法解析的外部符号

报错.PNG (8.35 KB, 下载次数: 191)

报错.PNG

作者: 千手斑    时间: 2019-5-14 12:40
fcode 发表于 2019-5-13 18:24
求助最基本的错误提示都不给出来。

1>------ 已启动生成: 项目: Cq, 配置: Debug Win32 ------
1>Linking...
1>test.obj : error LNK2019: 无法解析的外部符号 _SGETRF,该符号在函数 _MAIN__ 中被引用
1>test.obj : error LNK2019: 无法解析的外部符号 _SGETRS,该符号在函数 _MAIN__ 中被引用
1>Debug\Cq.exe : fatal error LNK1120: 2 个无法解析的外部命令
1>
1>Build log written to  "file://C:\Users\ChenQiang\source\repos\Cq\Cq\Debug\BuildLog.htm"
1>Cq - 3 error(s), 0 warning(s)
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
作者: fcode    时间: 2019-5-14 12:44
我试了一下没有问题,可能在于你的操作有问题。
比如工程属性填错了,32位和64位,debug和release是独立的等等。

我不太能判断具体是什么原因。你可以加入我们的QQ群:2338021,方便截图或者加QQ远程协助。




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