Problem to run exe on other computers

Problem to run exe on other computers

Hello,

I have Intel Visual Fortran Compiler with VS2010.

I have problem to run exe files created in my Fortran project on other computers without compiler or visual studio. The error messages are different (depending on OS), from missing dll files (win7), not a valid Windows image (Win XP) to application was not able to start correctly (Win7).

The test code is simple »Hello world« line.

I installed Fortran redistributable package, copied required files in the folders and all other recommended steps on the forum but code still doesn’t run.

I will be thankfull for any help how to solve this issue.

Rg

Andrija

 

 

16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The first two articles I link below will be helpful for the first two issues you describe. The third article might help for the third, or it may be the first one.

What do I need to deploy my Fortran application on a system where the compiler is not installed?

I get errors running my VS2012 or VS2013-linked program on Windows XP

What are the virtual memory addressing limits on 32-bit and 64-bit Windows?

Retired 12/31/2016

Dear Steve,

Thank you for your prompt reply.

Yes, the Redistributable libraries were installed on 3 computers (1xp, 2 WIN7 64-bit), but on WIN7 machines the error was that: The application was unable to start correctly (0xc000007b)....

On WIN_XP error was: The application or DLL c:\Public MSVCR100D.dll is not valid Windows image....

Before installation of redistributable lib. the error was for missing dll's (https://software.intel.com/en-us/forums/topic/291216).

I have also IMSL installed so I dont know if that may affect the creation of the exe files.

 

 

 

 

The XP error is almost certainly the topic of the second article link. The "could not start correctly" is probably that you don't have the right Microsoft Visual C++ redistributables installed.

Retired 12/31/2016

Dear Steve,

The Microsoft Visual Studio 2010 is installed on the computer used for code creation.

Second article mentions only VS2012 and VS2013.

The Microsoft Visual C++ redistributables (http://www.microsoft.com/en-us/download/details.aspx?id=5555) were installed on one WIN7 computer. The instalation of second was not possible because windows stated that has newer Microsoft Visual C++ redistributable.

Enclosed is Copy Info from VS2010:

 

 

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.5.50938 SP1Rel

Installed Version: IDE Standard

Microsoft Visual Web Developer 2010   01011-532-2002361-70833
Microsoft Visual Web Developer 2010

Hotfix for Visual Studio 2010 Shell (Integrated) - ENU (KB2548139)   KB2548139
This hotfix is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2548139.

Hotfix for Visual Studio 2010 Shell (Integrated) - ENU (KB2549864)   KB2549864
This hotfix is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2549864.

Hotfix for Visual Studio 2010 Shell (Integrated) - ENU (KB2635973)   KB2635973
This hotfix is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2635973.

Intel(R) Visual Fortran     Package ID: w_fcompxe_2013_sp1.1.139
Intel(R) Visual Fortran Composer XE 2013 SP1 Update 1 Integration for Microsoft Visual Studio* 2010, 14.0.0074.2010, Copyright (C) 2002-2013 Intel Corporation
* Other names and brands may be claimed as the property of others.

Security Update for Visual Studio 2010 Shell (Integrated) - ENU (KB2644980)   KB2644980
This security update is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this security update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2644980.

Security Update for Visual Studio 2010 Shell (Integrated) - ENU (KB2645410)   KB2645410
This security update is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this security update will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2645410.

Visual Studio 2010 Shell (Integrated) - ENU Service Pack 1 (KB983509)   KB983509
This service pack is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.

Interesting. Do you have any large COMMON or local arrays in this program? (By large I mean more than 1GB in total). Do you get any linker warnings when building the executable?

Retired 12/31/2016

In my office we routinely develop programs on three or four different computers (which are a mix of XP and Win7) to produce exe files, and then we run them on a variety of other computers that definitely do not have IVF or VS installed. We have never had any problem with the exe's refusing to run. So I am a bit shocked to hear of others having such problems, even with a simple "hello world" application, and the ensuing advice for how (routinely, it seems) to deal with it.

Are we just lucky? Is it because our programs are relatively simple (e.g. no dll's called)? What should we look out for regarding preventive maintenance or future expectations?

The primary issue I am aware of is if you use VS2012 or VS2013, due to a Microsoft change. The article I linked to explains what to do.

Retired 12/31/2016

Now I'm really confused. We have used only VS 2010 Shell, which according to your last response could be the reason we have been trouble-free. But reading over the links you gave, some of them seem to refer to exactly that. It's a bit overwhelming, I don't know if I should spend time reading through the links or not.

If your programs are statically linked to the runtime libraries, then you do not need to distribute anything with the program (whether .exe or .dll).  (This happens with the Multithreaded Library option).

Programs that use the Multithreaded DLL Library option only link with the runtime libraries at runtime - these programs need the redistributable libraries on other machines.

For all my applications, I use statically linked runtime libraries.  The penalty is larger executables, but the benefit is simpler deployment on multiple machines with different OS versions, etc.

David

Only the second link, which explicitly refers to Windows XP, relates to VS2012/VS2013. I am not aware of any issues relating to VS2010 and XP compatibility.

Retired 12/31/2016

Dear Steve,

The program is simple "Hello world" line with no COMMON or local arrays.

There are no linker warnings when building the executable (BuildLog and map file enclosed).

I was surprised that this, and similar problems, exist with exe files compared to the Compaq VIsual Fotran that I used previously.

Regards,

Andrija

Attachments: 

AttachmentSize
Downloadapplication/rar Debug.rar22.78 KB
Best Reply

I see the problem. You built a Debug configuration where the run-time library type is DLL (this is the default now.) Such applications are not portable to systems that don't have the same version of Visual Studio installed. Build a Release configuration and it should work better. You can make it easier by changing the Libraries > Run-Time Library type to "Multithreaded" from "Multithreaded DLL".
 

Retired 12/31/2016

Dear Steve.

Thank you for reply.

Change worked for "Hello world" application.

However, for my program, that has call to IMSL functions, same error appears when I run it on other computers (BuildLog and map file enclosed).

The call to IMSL is:

INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

 

Attachments: 

AttachmentSize
Downloadapplication/rar Debug.rar64.26 KB

Dear Steve,

Error found and corrected. The Fortran redistributable package was not correct, resulting in error at execution.

My open question is if code can be compiled to work without installation of redistributable packages (including IMSL).

Thank you and regards,

Andrija

No, because you will need at least libiomp5md.dll on the target system. You won't need an IMSL DLL there the way you are building.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today