[vtkusers] Windows: Correctly linking the debug and release libraries in a CMake-based project

John Drescher drescherjm at gmail.com
Wed Jan 27 05:52:20 EST 2010


> and for the project you have to add Debugging path and Linker Input paths by
> right click project and select properties then select debugging and find
> "Environment" and write there your paths..
>
> for me the paths are like this.
>
> Debugging part of the project
>
> PATH=$(QTDIR)\bin;$(VTK)\bin\$(ConfigurationName);$(ITK)\bin\$(ConfigurationName);$(PATH)
>
> my $(VTK) and $(ITK) is C:\VTK\Vtk-Win and C:\ITK\Itk-Win they are defined
> in system environment.
>
> note that you have to add debug libs for debug linker input and release libs
> for release linker input.
> Debug                                             Release
> qtmaind.lib                                       qtmain.lib...
> QtCored4.lib
> QtGuid4.lib
> .
> vtkVolumeRendering.lib
> vtkGraphics.lib
> QVTK.lib
> .
> itkvnl_algo.lib
> itkv3p_netlib.lib
> .
Now for debugging you can either adjust your paths inside Visual
Studio so it finds your .dlls or have cmake copy the dependent dlls to
the debug and release binary folders. The latter is what I do for Qt.
I generally link VTK and ITK statically so I do not mess with them.

John



More information about the vtkusers mailing list