I would like to build a fully static Fortran application using Intel Visual Fortran 2019 and Visual Studio 2019 Enterprise.
I need to include the IMSL 7 library in my application.
In VS Project Properties, I setted the static include dir and the "Additional libraries directory".
So, I started my program with this code:
include 'LINK_FNL_STATIC.h' !DEC$ OBJCOMMENT LIB: "libguide.lib"
But I got a linker error:
Can not open "libguide.lib"
So I tried another thing:
include 'LINK_FNL_STATIC_IMSL.h' !DEC$ OBJCOMMENT LIB: "libomp5md.lib"
But I got a different linker error:
unresolved external symbol __io_func referenced in funtion l_open_license_file unresolved external symbol sprintf referenced in funtion l_open_license_file
How can I static link the IMSL library in my IVF program?
The IMSL libraries were probably built with VS 2008 or VS 2010 tools, so you should not be surprised by running into linker errors. The choices are (i) build using an older version of VC/VS and Ifort or (ii) obtain a current version of IMSL (iii) relax the requirement that your application should not depend on DLL libraries, and try again.
I keep an older version of VS and Ifort just for handling such situations, where there is an older third party library (such as IMSL) for which I don't have source code.
So, in this setup, how can I build a static link Fortran application?
My system is:
My responses were base on your statement in the original post that you were using IMSL 7. The last version marketed by Intel with Ifort was 7.0.1.
If you switched to IMSL 2018 and are still running into a library incompatibility, you may need to follow up with Roguewave IMSL support.