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_
Principiante
1.721 Visualizações

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 Solução
Lorri_M_Intel
Funcionário
1.721 Visualizações

Wen,

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

   Select the option that is simply "Multithreaded".

                            --Lorri

 

 

 

Ver solução na publicação original

9 Respostas
TimP
Colaborador honorário III
1.721 Visualizações

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.

Wen_C_
Principiante
1.721 Visualizações

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

 

netphilou31
Novo colaborador III
1.721 Visualizações
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.
Steven_L_Intel1
Funcionário
1.721 Visualizações

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".

Wen_C_
Principiante
1.721 Visualizações

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.

 

Lorri_M_Intel
Funcionário
1.722 Visualizações

Wen,

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

   Select the option that is simply "Multithreaded".

                            --Lorri

 

 

 

Steven_L_Intel1
Funcionário
1.721 Visualizações

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".

Wen_C_
Principiante
1.721 Visualizações

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. 

Steven_L_Intel1
Funcionário
1.721 Visualizações

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.

Responder