lxxx 发表于 2020-10-12 08:38:17

fortran无法调用imsl

环境和编译器用的是vs2019和ivf2020,imsl用的是2018;编译路径也都按网上说的填写好了,
前后一共出现过两种情况:
1.最开始时语句include 'link_fnl_shared.h'编译没错,但语句use lin_sol_gen_int
use rand_gen_int
use error_option_packet会提示平台不对,且有“模块计算机类型“X86”与目标计算机类型“x64”冲突”的警告。
按网上的提示稀里糊涂一顿骚操作之后出现下述情况2
2.现在的错误提示为can not open,如下面图片所示。
http://bbs.fcode.cn/forum.php?mod=image&aid=2905&size=300x300&key=edf49264fd4225b9&nocache=yes&type=fixnone
我的完整程序为:(即imsl手册中的第一个例子)
include 'link_fnl_shared.h'
use lin_sol_gen_int
use rand_gen_int
use error_option_packet
implicit none
! This is Example 1 for LIN_SOL_GEN.
integer, parameter :: n=32
real(kind(1e0)), parameter :: one=1e0
real(kind(1e0)) err
real(kind(1e0)) A(n,n), b(n,n), x(n,n), res(n,n), y(n**2)
! Generate a random matrix.
call rand_gen(y)
A = reshape(y,(/n,n/))
! Generate random right-hand sides.
call rand_gen(y)
b = reshape(y,(/n,n/))
! Compute the solution matrix of Ax=b.
call lin_sol_gen(A, b, x)
! Check the results for small residuals.
res = b - matmul(A,x)
err = maxval(abs(res))/sum(abs(A)+abs(b))
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Example 1 for LIN_SOL_GEN is correct.'
end if
end

ps:同样的配置和设置方法在其他电脑上就没问题,不知为何现在出现这么多问题,跪求大神相助!!

vvt 发表于 2020-10-13 08:34:49

看本论坛视频教程
http://v.fcode.cn/video-use_library.html

lxxx 发表于 2020-10-13 18:33:06

感谢,把32位的imsl安装并添加路径以后,可以编译了,但是出现了这个问题:
请问该怎么解决呢?:'(
页: [1]
查看完整版本: fortran无法调用imsl