[vtkusers] Unable to port a vtk application to a computer which doesnt have vtk installed.

Obada Mahdi omahdi at gmx.de
Tue Nov 21 19:19:12 EST 2006


Hi Rashed,

On 11/22/06, rashed karim <rashed.vtk at googlemail.com> wrote:
> I have written an application in visual c++ which uses VTK. After compiling
> it produces an .exe which runs fine. But, when I copy-paste the .exe file of
> this application to another computer which doesn't have VTK compiled and
> installed, it doesn't work.

there is (in general) more to a "clean" deployment of a project than
just manually copying some files.  For example, when you are linking
your project against the shared runtime libraries from Visual Studio,
those libraries need to be distributed with your project as well, in
addition to the VTK libraries (if you are building shared VTK
libraries), because other systems might just not have those exact
libraries installed.

Unfortunately, I do not know all too much about deploying programs
created with Visual Studio--this might be a starting point for more
general information:

http://msdn2.microsoft.com/en-gb/library/zebw5zk9(VS.80).aspx

It might also be a good idea to try CPack, which is a tool that comes
with CMake, and is meant "to abstract package generation on specific
platforms":

http://www.cmake.org/Wiki/CMake:Packaging_With_CPack

I actually do not know anything about it, but I am sure that, either
here or in the CMake users mailing list, there are many people who
know more about this stuff and can assist you :-)

> It is what I had expected, so I copied all .lib
> files (such as vtkHybrid.lib, vtkVolumeRendering.lib, etc) to that computer,
> and it still doesnt work.

If you are using shared libraries, what needs to be distributes along
with the ".exe" are the "*.dll" files, not "*.lib".  You can try to
copy the DLLs, but like mentioned above, there is no guarantee that
this will be enough.

> How can I make my application on the other computer work?
>
> Any help will be appreciated,

Hopefully more experienced developers will jump in here :-)


Obada



More information about the vtkusers mailing list