[vtkusers] VTK dll error

Obada Mahdi omahdi at gmx.de
Wed Dec 6 19:52:04 EST 2006


Hello Oleg,

On 12/6/06, Oleg Pianykh <opiany at gmail.com> wrote:
> I compiled a sample VTK project (rotating cone) in Visual Studio, but when I
> am trying to run it, I get error messages like:
> "This application has failed to start because vtkFiltering.dll was not
> found"
>
> If I copy VTK dlls into the same folder where my project's executable is,
> everything works.

this is perfectly normal.

> 1. Can I link VTK into my project statically (.lib only), avoiding any dll?
> I did include all vtk static libs into my project properties, but it keeps
> asking for dlls.

Yes, static linking is possible.  You need, however, to use a separate
VTK build that has the "BUILD_SHARED_LIBS" setting disabled, found
amongst the "advanced settings" in the CMake configuration process,
and link against the .lib files from that installation.

I suppose that you have tried with .lib files that were installed
along with DLLs (if this is not what has happened, please correct me).
 Those are not full static versions of corresponding DLLs, they are
called "import libraries" and just contain function entry points,
which imported symbols are resolved against at link time.


HTH,

Obada



More information about the vtkusers mailing list