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

Static Link: Intel Visual Fortran 2019 + IMSL 2018

Maia__Nycholas
Beginner
2,692 Views

I know that now IMSL is part of RogueWave, but could you please try to help me in this question below:

I wrote a simple Fortran program that use some IMSL functions.
Using  shared-linking (dynamic), I can compile, link and run my application without any errors or warnings.

Now, I want to link all IMSL dependencies statically. But, how can I do that?

Today, my current project configurations is:

1- Use IMSL shared header:

include 'link_fnl_shared.h'

In the Menu Tools -> Options -> Intel Composer XE -> Visual Fortran -> Compilers -> x64:

2- Added to Include:

C:\Program Files (x86)\RogueWave\imsl\fnl-2018.0.0\win100in170x64\include\dll

3- Added to Library:

C:\Program Files (x86)\RogueWave\imsl\fnl-2018.0.0\win100in170x64\lib

-------------------------------

Now I'm trying to change these configurations to get a fully static linked Fortran application.

What I already tried:

  • Try 1:
include 'link_fnl_static.h'
unresolved external symbol __iob_func referenced in function l_open_license_file
unresolved external symbol sprintf referenced in function l_open_license_file
  • Try 2:
include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
unresolved external symbol __iob_func referenced in function l_open_license_file
unresolved external symbol sprintf referenced in function l_open_license_file
  • Try 3:
include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
!DEC$ OBJCOMMENT LIB:'libguide.lib'
cannot open file 'libguide.lib'
  • Try 4:

In the Menu Tools -> Options -> Intel Composer XE -> Visual Fortran -> Compilers -> x64:

2- Chenge the Include to de static header version:

C:\Program Files (x86)\RogueWave\imsl\fnl-2018.0.0\win100in170x64\include\static
Same erros...

How can I link my Fortran application with IMSL libraries in the static way?

My setup is:

  • Windows 10 x64
  • Visual Studio 2019 Enterprise
  • Intel Visual Fortran 2019 (Parallel Studio 2019 - Cluster Edition Update 4)
  • IMSL Fortran Library 2018

Obs.: I already read the Intel article below, but I think that my linking erros are different.
https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries/

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
2,692 Views

All I can tell you is that the symbols being looked for are in the Microsoft Visual C++ run-time library. On Windows, at least, code compiled by C/C++ is sensitive to the choice of static vs. shared and debug vs. non-debug libraries (Intel Fortran code is not). If you have C/C++ code compiled against a specific set of libraries, you have no choice but to build your application against that same library set.

I will comment that "libguide.lib" is WAY obsolete and should not be referenced.

My guess is that the IMSL license-checking code, which was not present in the IMSL that Intel sold, is built against the C/C++ shared libraries, so you will need to build your Fortran project against shared run-time libraries (even though the IMSL library is static.) If you need more help, you will have to ask RogueWave support.

0 Kudos
Reply