布衣龙共 发表于 2021-3-4 08:31
http://v.fcode.cn/video-use_library.html
这里有个视频教程看看~
include 'link_fnl_static.h'
use lin_sol_gen_int
use rand_gen_int
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)
integer::i,j
! 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)
do i=1,32
do j=1,32
print*,A(j,i)
enddo
enddo
end
错误 1 error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
错误 2 error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
错误 3 error LNK2005: __call_reportfault 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |