[Insight-users] compiling VTK and ITK
Brad King
brad.king at kitware.com
Mon, 26 Apr 2004 12:16:51 -0400
Sergio Andres wrote:
> Brad King escribió:
>
>> Sergio Andres wrote:
>>
>>> Hi,
>>>
>>> Brad King escribió:
>>>
>>>>
>>>> The name mangling change was just made to VTK last week. Was this a
>>>> fresh build of VTK or did you just CVS update in the same source
>>>> directory as the 4.2 version?
>>>>
>>>> -Brad
>>>>
>>> I downloaded VTK source code from CVS ( checkout ) and built it.
>>> Then I rebuilt my application and the same link errors appeared again.
>>>
>>> Maybe, it has to do with the CMake Options...??
>>> To build VTK, I turned ON:
>>>
>>> VTK_USE_HYBRID ON
>>> VTK_USE_PATENTED ON
>>> VTK_USE_RENDERING ON
>>> VTK_USE_ANSI_STDLIB ON
>>
>>
>>
>> These options should not affect this error. Which link errors
>> appeared again? The duplicate symbols or the unresolved symbols?
>>
>> -Brad
>>
> Sorry, I forgot to include this in previous mail:
>
> The unresolved symbols:
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_get_io_ptr
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_write_end
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_write_image
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_set_swap
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_write_info
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_set_IHDR
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_set_error_fn
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_init_io
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_set_write_fn
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_destroy_write_struct
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_create_info_struct
> vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
> _vtk_png_create_write_struct
>
> But I included vtkpng.lib and it seems to work now! ( It worked fine
> with previous releases of ITK / VTK..)
Is your project built by CMake? If so, the vtkpng library should have
been included automatically when you linked to vtkIO.
-Brad