[Insight-users] Issues when execute the itk program on machines other than the one where it was compiled

Luis Ibanez luis.ibanez at kitware.com
Thu May 7 17:07:06 EDT 2009


Hi Ken,


0) Did you build your executable for "Release" ?
    If not, then this is the first thing you want to do,
    since Debug libraries are only available in machines
    that have a VS compiler installed.


1) It is better if you build ITK as a static library
    instead of a shared library. In that way you don't
    have to copy any ITK DLLs.  Note that ITK is mostly
    a templated library, therefore using shared libraries
    doesn't really help to factorize memory consumption.

2) If you insist on using shared libraries, then note
    that what you have to copy is ITKCommon.dll, not
    ITKCommon.lib.


3) Use the dependency walker
    http://www.dependencywalker.com/
    in order to identify the DLLs that your executable
    is not finding in the destination machine.

    Once you identify those DLLs you can simply copy them.


4) The 'right' way to do this is to configure your application
    to "Install", and then you can use CPack (one of the CMake)
    components in order to generate a Installer that you can
    run in your destination machine.

    The Installer executable will carry with it all the required DLLs.




    Regards,


        Luis


--------------------
ken wrote:
> I compiled an itk program at machine A, and then copied the executable 
> file to machine B. It fails to work at machine B, though I copied the 
> ITKCommon.lib. Any ideas? Do I have to install ITK to machine B and then 
> compile the program locally in order to make it work?
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list