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

Fortran Static Library Problems

Scott_Begg
Beginner
442 Views

The document at https://software.intel.com/sites/default/files/m/d/4/1/d/8/11x_Redistribution_FAQ_Windows.pdf describes how to build a Fortran static library. The document states "An application built with statically-linked libraries eliminates the need to distribute runtime libraries with the application executable. By linking the application to the static libraries, the application is not dependent on the Intel Fortran or C/C++ DLLs, or the Microsoft Visual C++ DLLs." I followed the directions of how to build a statically-linked library from within the Microsoft Visual Studio IDE which basically states to use the "Multithreaded" setting under [Project Property -> Fortran -> Library -> Runtime Library] . FYI, I built the Fortran library using Visual Studio 2013 Update 4 with Intel Parallel Studio XE 2015 Update 4.

I gave the static Fortran .lib file to someone who is building a Visual C++ 2013 application. When the person tries to build their C++ application with my library they get the following error, "fatal error LNK1104: cannot open file 'ifconsol.lib'". It appears that my Fortran static library still has a link to an Intel Fortran library. How do I build a Fortran static library that I can provide to someone that does not have any Intel Fortran library dependencies? The person developing the C++ application indicated that the following info was generated from dumping the symbols in the my static library:

  Linker Directives
   -----------------
   -defaultlib:ifconsol
   -defaultlib:libifcoremt
   -defaultlib:libifport
   -defaultlib:libmmt
   -defaultlib:LIBCMT
   -defaultlib:libirc
   -defaultlib:svml_dispmt
   -defaultlib:OLDNAMES
 

Some of these exist as lib files in my C:\Program Files (x86)\Intel\Composer XE 2015\compiler\lib\intel64 directory. I assume that these files cannot be provided to someone who does not have Intel Fortran.

 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
442 Views

You're distributing a static library, not an executable. We do, however, allow you to redistribute most of our non-debug static libraries. Look in C:\Program Files (x86)\Intel\Composer XE 2015\Documentation\en_US\fredist.txt for the list of files you may redistribute.

libcmt is a MSVC library - you can't redistribute that, but your end user may have it. oldnames.lib isn't needed.

0 Kudos
Reply