Radial.o : Error LNK2001: Unresolved External Symbol Lambda_fatal Error LNK1120: 8 Unresolved Externals,error.failed With Exit Status 1120
Solution 1:
Edit: If you are using an open-source package there may be instructions for how to compile your program, what system setup is required (os, compilers), etc. There may be a "make" file that can be used.
There are many warnings/error messages here. My suggestion is to begin by making sure that the subroutines called by rad_fun
are available during the build process. If the missing "utility" functions are not found in the source file with rad_fun
, they should be contained in one or more separate files included with the package.
Try placing lambda_
and each of the other "utility" subroutines used by rad_fun
into a module at the beginning of your source code. Then USE that module within rad_fun
and attempt to compile. For example:
module my_module
implicit none
contains
subroutine lambda_(arg1,arg2)
...
end subroutine lambda_
end module my_module
subroutine rad_fun(arg1,arg2...)
use my_module
...
end subroutine rad_fun
Solution 2:
radial.for first lines edited:
MODULE my_module
IMPLICIT NONE
CONTAINS
INCLUDE 'lib.for'
END MODULE
…
SUBROUTINE rad_fun (kob, m, ne, C2, KSI0, EPS, R1f, R1d, R2f,R2d)
USE my_module
...
command f2py -c radial.for
radial.for:
so the error disappeared
After definition of subroutine
COMPLEX*16 bdc9
When I want to call function
bdc9=CMPLX(C2,0.0)
call lambda(K,M,ne,bdc9,EPS,rlc2,ie)
Post a Comment for "Radial.o : Error LNK2001: Unresolved External Symbol Lambda_fatal Error LNK1120: 8 Unresolved Externals,error.failed With Exit Status 1120"