Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussões

How to deploy just an *.exe file, with no installer, path setting and dll stuff.

farukhsharipov
Principiante
2.479 Visualizações
Can anyone help me with deploying my software just in *.exe file without installing any packages or dll's. Is there no linker switch in Visual Fortran to include the whole intel lib into the exe or into another lib? In Visual Studio IDE under Project -> Project_Name Properties->Command Line: I have /nologo /module:"Release\\\\" /object:"Release\\\\" /Fd"Release\\vc100.pdb" /libs:static /threads /c
But when I try to run the application on the pc which don't have Visual Fortran instaled it gives me error saying, thatlibifcoremd.lib is missing. can anyone help me to resolve this issue.
Any advise would be highly appriciated.
Thanks in advance.
0 Kudos
1 Solução
TimP
Colaborador honorário III
2.479 Visualizações
libiomp5 isn't covered by the general static option. The 11.x compilers have a separate option
/Qopenmp-link:static
whose effect is to link libiomp5mt.lib in place of libiomp5md.dll.

This option is labeled deprecated for the 12.0 compilers, so you would not expect to find a GUI check box for it. When the subject came up on this forum earlier this month, it was stated it should still work in command line options, as should putting libiomp5mt.lib explicitly in your library dependencies. One reason for the separate option is it is strongly advised not to link the static openmp library into a .dll (in case you were making one), only to link it into a final .exe.

Ver solução na publicação original

10 Respostas
Steven_L_Intel1
Funcionário
2.479 Visualizações
The options you say are in effect would link in all libraries statically. I am a bit confused as to the error message because you might get an error about libifcoremd.dll (not .lib) - was that a typo?

Please attach the buildlog.htm from the build you used.
farukhsharipov
Principiante
2.479 Visualizações
Dear Steve
Thanks for you reply.
//--------------------------------------------------
I am not 100% sure right now if it's (*.dll) or (*.lib) since the pc which I tried is not with me right now. But this morning I tried to run the program on our office computers and it worked, even though I didn't changed any settings. But think it's becauseat one point all the office computers had Visual Studio installed. So my question is would this work on the pc's which never had Visual Studio installed ?
Here is the link toBuildLog.htm

Thanks in advance.

TimP
Colaborador honorário III
2.479 Visualizações
dumpbin /dependencies *.exe will show you whether any Visual Studio or ifort dlls are required.
Your log said /libs:static was ignored, but it should be the default.
farukhsharipov
Principiante
2.479 Visualizações
dumpbin /dependencies *.exe gives me:
[fortran]Microsoft  COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : warning LNK4044: unrecognized option '/dependencies'; ignored

Dump of file PSI_Mesh_Generator.exe

File Type: EXECUTABLE IMAGE

  Summary

       11000 .data
       18000 .rdata
        9000 .reloc
        1000 .rsrc
       90000 .text
        1000 .text1
        1000 .trace[/fortran]
Yes I saw that /libs:static was ignored but I don't know why. Any suggestions ?
TimP
Colaborador honorário III
2.479 Visualizações
oops, its spelled dependents on the command line, dependencies in the output
farukhsharipov
Principiante
2.479 Visualizações
Thanks for the advise. Now i get
[fortran]Microsoft  COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file PSI_Mesh_Generator.exe

File Type: EXECUTABLE IMAGE

  Image has the following dependencies:

    KERNEL32.dll
    imagehlp.dll

  Summary

       11000 .data
       18000 .rdata
        9000 .reloc
        1000 .rsrc
       90000 .text
        1000 .text1
        1000 .trace[/fortran]
So now my question would be how can I get rid of?
[fortran]KERNEL32.dll
imagehlp.dll[/fortran]
And why compiler ignores /libs:static ?
[bash]Linking...
LINK : warning LNK4044: unrecognized option '/libs:static'; ignored
LINK : warning LNK4044: unrecognized option '/threads'; ignored


PSI_Mesh_Generator - 0 error(s), 2 warning(s)[/bash]
TimP
Colaborador honorário III
2.479 Visualizações
kernel32.dll and imagehlp.dll should always be present in minimum Windows installations. If they've been deleted or corrupted, a windows repair from a trusted DVD would replace them.
Steven_L_Intel1
Funcionário
2.479 Visualizações
The compiler is not ignoring the options - the linker is, because you specified them as link options. These should be compiler options.

Looking at the dependence output shows no dependence on Intel Fortran run-time DLLs. Are you sure you're running the same EXE?
TimP
Colaborador honorário III
2.480 Visualizações
libiomp5 isn't covered by the general static option. The 11.x compilers have a separate option
/Qopenmp-link:static
whose effect is to link libiomp5mt.lib in place of libiomp5md.dll.

This option is labeled deprecated for the 12.0 compilers, so you would not expect to find a GUI check box for it. When the subject came up on this forum earlier this month, it was stated it should still work in command line options, as should putting libiomp5mt.lib explicitly in your library dependencies. One reason for the separate option is it is strongly advised not to link the static openmp library into a .dll (in case you were making one), only to link it into a final .exe.
farukhsharipov
Principiante
2.479 Visualizações
Dear TimP (Intel)
Thanks for your reply.
In Project Properties ->Fortran -> Command Line-> Additional Options: I added:/Qopenmp-link:static

Which simse to solve my problem thanks a lot again.
Responder