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.
- I can't use a older Visual Studio version. I have only the 2019 Enterprise version.
- I have the last version of IMSL installed in my PC (version 2018)
- Yes. To do that, I need to build my application using the static link with the IMSL library
So, in this setup, how can I build a static link Fortran application?
My system is:
- Windows 10 x64
- Intel Visual Fortran 2019
- Visual Studio 2019 Enterprise
- IMSL Fortran 2018 (last version)
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.