[vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64"

Ben Boeckel ben.boeckel at kitware.com
Thu Jul 23 16:36:21 EDT 2015

On Thu, Jul 23, 2015 at 20:56:47 +0300, the lily wrote:
> I built VTK on OSX 10.9 using the following tutorial
> http://stackoverflow.com/questions/17329258/how-to-install-vtk-6-1-for-osx-10-8-with-cocoa-xcode-support
> I'm trying to use VTK in my code but I'm having trouble liking VTK  my
> code. I'm not sure what is the problem. Is it the gcc version? or is
> it the way I'm linking the libraries? I'm using the following
> directory Users/lily/VTK/VTKBuild/libthis is part of the error I'm
> getting
> "_vtk_png_create_info_struct", referenced from:
>       vtkPNGWriter::WriteSlice(vtkImageData*, int*)    in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o)

What's the link line you're using? You're likely missing -lvtkpng-6.1.


More information about the vtkusers mailing list