[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode Program www_fcode_cn
  call Test_sdot()
End Program www_fcode_cn
  
Subroutine Test_sdot!矢量点乘
  use BLAS95 !// 必须 use 某个module
  implicit none
  real x(10), y(10), res !// sdot 和 dot 无需声明
  integer n, incx, incy, i
  !external dot // 同上
  n = 5
  incx = 2
  incy = 1
  do i = 1, 10
    x(i) = 1
    y(i) = 1
  end do
  res = dot ( x,  y ) !// F95 的接口很简单,两个参数既可
  print*,"SDOT=",res 
  res=dot(x,y)
  write(*,*) res
End subroutine 
 
另外,你可能需要设置 
项目—属性—Linker-Input-Additional Dependencies 输入 mkl_blas95.lib |