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

Redistribution with static link lib

Wen_C_
Beginner
1,693 Views

I am using Visual Studio 2013 with Intel Fortran XE 2015.  Followings are my steps: File - New - Project - Intel Visual Fortran - Console Application - Main Program Code (with sample codes, so I do not have to write anything).  Then Change to Release Mode before build the application.  However, move this program to my another computer and it will NOT run.  I do not want copy all the dlls to another computer, so I would like to use Static Link Lib.  According to the Intel Manual, I should be able to do so.  But the manual did not say how to  use Static Link Lib.  Please help.

0 Kudos
1 Solution
Lorri_M_Intel
Employee
1,693 Views

Wen,

   You picked "Multithreaded DLL", which says you want to use DLL libraries.

   Select the option that is simply "Multithreaded".

                            --Lorri

 

 

 

View solution in original post

0 Kudos
9 Replies
TimP
Honored Contributor III
1,693 Views

ifort sets visual studio up by default with /MT for release mode, so if you do a full rebuild in release mode, all possible static libraries will be used.  icl doesn't have this default, so you would need to change it in your project. 

If you link OpenMP, you will need to include libiomp5 dll.

0 Kudos
Wen_C_
Beginner
1,693 Views

Tim, I am using VS2013 and all the steps are listed in my first post.  Everything is default by either VS or Intel Fortran.  If I understood your comment, I should be able to run this exe on other computers, but I can NOT.  I did not use any OpenMP, nor any strange features.  All the code were provided by Intel Fortran default, see below.  There is really only 1statement in the code. 

program Console1

implicit none

! Variables

! Body of Console1

print *, 'Hello World'

end program Console1

 

0 Kudos
netphilou31
New Contributor III
1,693 Views
Wen, If you want to link with static libraries go to the project properties, fotran, libraries and then select debug multithreaded or multithreaded depending on your configuration (debug or release) Best regards Phil.
0 Kudos
Steven_L_Intel1
Employee
1,693 Views

We changed the default in the previous release to use the DLL libraries by default. To link with the static libraries, set the project property Fortran > Libraries > Runtime Library to "Multithreaded".

0 Kudos
Wen_C_
Beginner
1,693 Views

I am not sure if I need any DLL for that simple code.  I just try to understand why this simple code, once it is built in Release mode and would NOT run on another computer.  The error says "This application has failed to start because libifcoremd.dll was not found.  Re-installing the application may fix this problem.".  I DID use "Multithreaded" in the run-time option, see attached screen dump.

Does this mean that I have to copy this libifcoremd.dll with the exe file in the same folder, in order to run this simple program ?  This is very frustrating.

 

0 Kudos
Lorri_M_Intel
Employee
1,694 Views

Wen,

   You picked "Multithreaded DLL", which says you want to use DLL libraries.

   Select the option that is simply "Multithreaded".

                            --Lorri

 

 

 

0 Kudos
Steven_L_Intel1
Employee
1,693 Views

I'll also mention that if you use OpenMP (either directly or through IMSL) or coarrays, then you will have dependency on DLLs even if you set the option to "Multithreaded".

0 Kudos
Wen_C_
Beginner
1,693 Views

Lorri and Steve,  Thank you very much.  It works now.  I think by default it ought to be "multithreaded", not "multithreaded DLL".  Many engineers do not use Compilers everyday, this can be hard to figure out.  Thanks again. 

0 Kudos
Steven_L_Intel1
Employee
1,693 Views

The Microsoft default is to link to DLLs. There are many advantages to this for code size and reliability. The use of DLLs is a problem only when moving the program to a system where the compiler isn't installed, and for that we have a redistributables installer as does Microsoft.

0 Kudos
Reply