[vtkusers] vtkAVIWriter Linker Error

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri May 15 09:12:26 EDT 2009


On Fri, May 15, 2009 at 12:28 PM, Hackbard_C <Hackbard_C at gmx.de> wrote:
>
> Hello,
>
> i wanted to generate an AVI-File, so i tried using vtkAVIWriter and
> vtkWindowToImageFilter, but if I compile my programm (with Visual Stido
> 2005) i got the following linker erros
>
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIStreamSetFormat at 16
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIMakeCompressedStream at 16
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVISaveOptions at 20
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIFileCreateStreamA at 12
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIFileOpenA at 16
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIFileInit at 0
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIStreamWrite at 32
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIFileExit at 0
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIFileRelease at 4
> 1>vtkIO.lib(vtkAVIWriter.obj) : error LNK2001: unresolved external symbol
> _AVIStreamRelease at 4
>
> I added these Libs
>
> #pragma comment(lib,"vtkCommon.lib")
> #pragma comment(lib,"vtkDICOMParser.lib")
> #pragma comment(lib,"vtkFiltering.lib")
> #pragma comment(lib,"vtkGenericFiltering.lib")
> #pragma comment(lib,"vtkGraphics.lib")
> #pragma comment(lib,"vtkHybrid.lib")
> #pragma comment(lib,"vtkIO.lib")
> #pragma comment(lib,"vtkImaging.lib")
> #pragma comment(lib,"vtkNetCDF.lib")
> #pragma comment(lib,"vtkRendering.lib")
> #pragma comment(lib,"vtkVolumeRendering.lib")
> #pragma comment(lib,"vtkWidgets.lib")
> #pragma comment(lib,"vtkexoIIc.lib")
> #pragma comment(lib,"vtkexpat.lib")
> #pragma comment(lib,"vtkfreetype.lib")
> #pragma comment(lib,"vtkftgl.lib")
> #pragma comment(lib,"vtkjpeg.lib")
> #pragma comment(lib,"vtkpng.lib")
> #pragma comment(lib,"vtksys.lib")
> #pragma comment(lib,"vtktiff.lib")
> #pragma comment(lib,"vtkzlib.lib")
> #pragma comment(lib,"opengl32.lib")
> #pragma comment(lib,"glu32.lib")
>
> Does anyone know what to do?

Yes. Use cmake:

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
add_executable(vtkaivtool vtkaivtool.cxx)
target_link_libraries(vtkaivtool vtkIO)

cmake will pull all the dependencies required to link to vtkIO for you.

HTH
-- 
Mathieu



More information about the vtkusers mailing list