Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

unresolved external symbol error for code example

skravoof
Beginner
490 Views

Hi there,
Imovied to virual fortran from other compiler. I had installed version 11. When I tried to run the a code example given by intel for Using BLAS Level 1 Routine , i got the following error.
Error 1 error LNK2019: unresolved external symbol _SCOPY referenced in function _MAIN__ Console2.obj
I think there is problem with the library linking. Please find the library copied from the compiler options below.

$(IFortInstallDir)lib\\ia32

$(VCInstallDir)atlmfc\\lib

$(VCInstallDir)lib

$(WindowsSdkDir)lib


Thanks in advance.
Regards,
Ravoof


Code:
program copy_main

real x(10), y(10)

integer n, incx, incy, i

n = 3

incx = 3

incy = 1

do i = 1, 10

x(i) = i

end do

call scopy (n, x, incx, y, incy)

print*, (y(i), i = 1, n)

end

0 Kudos
1 Reply
TimP
Honored Contributor III
490 Views
The link advisor tool at the top of the MKL forum will ask you the questions you haven't answered here, and suggest the libraries you should put in your command line, or in the VS library dependencies.
As scopy here could be written more efficiently in line
y(1:1+(n-1)*incy:incy) = x(1:1+(n-1)*incx:incx)
it's not one of the more important BLAS functions, but it will put you through the link advisor exercise.
0 Kudos
Reply