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

David Doria daviddoria at gmail.com
Tue Jan 11 10:44:43 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.
>

I agree - this information should certainly be added to the Doxygen. The
next best thing is to look at which directory the files for the class are
in. E.g.

[doriad at localhost VTK]$ find . -name vtkImplicitPlaneWidget*
./Widgets/vtkImplicitPlaneWidget2.cxx
./Widgets/vtkImplicitPlaneWidget.cxx
./Widgets/vtkImplicitPlaneWidget2.h
./Widgets/vtkImplicitPlaneWidget.h

indicates that you should link to vtkWidgets.

Also, on the wiki examples:
http://www.vtk.org/Wiki/VTK/Examples/Cxx

each example comes with a CMakeLists.txt file. You can see which libraries
are needed for the example in the TARGET_LINK_LIBRARIES line.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110111/d0647776/attachment.htm>


More information about the vtkusers mailing list