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

How to creat and use my own fortran lib by using other dll?

Colder
Beginner
362 Views

Hello,

  I'd have gotten some fortran code below:

!**********************

subroutine wrapdsyev_(job,upper,n,A,ldA,W,work,lwork,info) bind(C)

external dsyev
integer job, upper
character jobz,uplo
if(upper.eq.0) then
uplo = 'L'
else
uplo = 'U'
endif
if(job.eq.0) then
jobz = 'N'
else
jobz = 'V'
endif
call dsyev(jobz,uplo,n,A,ldA,W,work,lwork,info)
end
!**************************************

according above info, wrapdsyev_() need an external funciton dsyev(this is a function from libblas.dll, liblapack.lib,liblapacke.lib). I introduced the path of lapack lib files(corresponding to dll files) to my fortran program and built this funtion and got my A.lib file.

   However, when I linked A.lib file to my C++ procedure, there comes an error "unresolved external symbol 'DSYEV' ", It's apparent that compiler couldn't find external dsyev, but I did not know what to do to solve this, and I'll be appreciate if someone can provide some solutions.

additional attachment: wrapdsyev_ is in lapackWrapper.f and lib files are added in both link->general->additional library directories and link->input->additional dependencies.

 

 

0 Kudos
1 Reply
Ron_Green
Moderator
321 Views

Intel's MKL Link Line Advisor may help.

 

0 Kudos
Reply