[Insight-users] itk exe's not running on no mfc installed machine

Luis Ibanez luis.ibanez at kitware.com
Tue, 27 Jan 2004 14:33:54 -0500


Hi Mark,

This is not an ITK problem.

It is simply a natural consequence of the
use of shared libraries by the compiler.


The file

           MSVCP71D.dll

is the Debug version of the shared library
and it is installed in your machine only
when you install Visual Studio .NET.

If you build executables for Debug in this machine,
they will be linked to this shared library, and when
you move the executable to another machine where the
library is not available the executable is unable to
run.

In principle you shouldn't move executables that have
been compiled for Debug. It is expected that you will
only move executables build for release,...
That what "release" means after all.

You could solve this by locating the MSVCP71D.dll
in your developing machine and copying it to the
second machine. The simple thing to do is to put
the DLL in the same directory where you put the
executable.

You may face the same problem if you build your
program for release and move it to an old Windows
system, where the shared libraries may be missing.

This is one of the reasons why people releasing
software prefer to build their executables with
the oldest possible compiler, since this will
increase the chances that the executable will
work in old windows systems.



Regards,


    Luis



--------------------------------
Mark Walter Wyszomierski wrote:

> Hi Luis,
> 
> I compiled the itk example projects and they have been working fine on my
> machine that has vc++ .NET installed on it. When I move the example exe's
> to a machine that does not have vc++ .NET on it (thus not having mfc
> installed) the example exe's fail to run, the error being:
> 
> "This application has falied to start because MSVCP71D.dll was not found"
> 
> I configured ITK with CMake using the default settings and compiled the
> ALL_BUILD.vcproj using the default settings, have I missed a setting that
> would cause the ITK example exe's to use mfc or need components of my
> compiler at runtime?
> 
> Thanks in advance Luis,
> 
> Regards,
> Mark
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>