[vtkusers] How to find out which library to link against

John Drescher drescherjm at gmail.com
Tue Jan 11 10:44:21 EST 2011


On Tue, Jan 11, 2011 at 10:38 AM, ianl <ilindsay at insigniamedical.co.uk> wrote:
>
> Real newbie question - I am really just starting out with VTK and am starting
> to play around a bit further than the examples. I am working on Windows with
> Visual Studio 2010, and I have built everything using CMake successfully and
> the examples compile and run fine.
>
> My question is quite simple really - I'm surprised I haven't found any info
> after lots of searching, so I am assuming I have missed something obvious.
> Where would I find out which .lib to link against for a given class? For
> example, if I wanted to use vtkImplicitPlaneWidget, how would I find out
> which .lib to link against. This info doesn't seem to be present in the
> DOxygen generated help pages (which I guess is expected as they are cross
> platform and generated from the source code). Any help would be greatly
> appreciated.
>

Usually the .lib is the same as the folder name prepended with vtk the
the source is in. Just add that to your TARGET_LINK_LIBRARIES
statement in you CMakeLists.txt and CMake will handle the linking for
you.

John



More information about the vtkusers mailing list