[vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64"
the lily
the.1.lily at hotmail.com
Sat Jul 25 11:21:03 EDT 2015
No I included almost all the necessary libraries, these are the libraries I'm including
-lvtkIOImage-6.1 -lvtkRenderingImage-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonExecutionModel-6.1 -lvtkCommonCore-6.1 -lvtkTestingRendering-6.1 -lvtkRenderingVolumeOpenGL-6.1 -lvtkRenderingVolume-6.1 -lvtkRenderingOpenGL-6.1 -lvtkRenderingLabel-6.1 -lvtkRenderingLIC-6.1 -lvtkRenderingCore-6.1 -lvtkInteractionWidgets-6.1 -lvtkInfovisLayout-6.1 -lvtkImagingColor-6.1 -lvtkIOVideo-6.1 -lvtkIOAMR-6.1 -lvtkGeovisCore-6.1 -lvtkFiltersParallel-6.1 -lvtkFiltersCore-6.1 -lvtkFiltersAMR-6.1 -lvtkCommonSystem-6.1 -lvtkViewsInfovis-6.1 -lvtkViewsGeovis-6.1 -lvtkViewsCore-6.1 -lvtkViewsContext2D-6.1 -lvtkTestingGenericBridge-6.1 -lvtkRenderingVolumeAMR-6.1 -lvtkRenderingLabel-6.1 -lvtkRenderingLOD-6.1 -lvtkRenderingLIC-6.1 -lvtkRenderingGL2PS-6.1 -lvtkRenderingFreeTypeOpenGL-6.1 -lvtkRenderingFreeType-6.1 -lvtkRenderingContext2D-6.1 -lvtkRenderingAnnotation-6.1 -lvtkParallelCore-6.1 -lvtkInteractionStyle-6.1 -lvtkInteractionImage-6.1 -lvtkInfovisLayout-6.1 -lvtkInfovisCore-6.1 -lvtkImagingStencil-6.1 -lvtkImagingStatistics-6.1 -lvtkImagingSources-6.1 -lvtkImagingMorphological-6.1 -lvtkImagingMath-6.1 -lvtkImagingHybrid-6.1 -lvtkImagingGeneral-6.1 -lvtkImagingFourier-6.1 -lvtkImagingCore-6.1 -lvtkImagingColor-6.1 -lvtkIOXMLParser-6.1 -lvtkChartsCore-6.1 -lvtkCommonColor-6.1 -lvtkCommonComputationalGeometry-6.1 -lvtkIOXML-6.1 -lvtkIOMovie-6.1 -lvtkCommonMisc-6.1 -lvtkCommonExecutionModel-6.1 -lvtkChartsCore-6.1 -lvtkCommonTransforms-6.1 -lvtkDomainsChemistry-6.1 -lvtkFiltersGeneral-6.1 -lvtkFiltersHybrid-6.1 -lvtkFiltersModeling-6.1 -lvtkFiltersSMP-6.1 -lvtkFiltersSources-6.1 -lvtkFiltersTexture-6.1 -lvtkIOExport-6.1 -lvtkIOGeometry-6.1 -lvtkIOImport-6.1 -lvtkIOMINC-6.1 -lvtkInfovisLayout-6.1 -lvtkRenderingLabel-6.1 -lvtkCommonMath-6.1 -lvtkCommonSystem-6.1 -lvtkFiltersGeometry-6.1 -lvtkIOCore-6.1 -lvtkIOExodus-6.1 -lvtkIOInfovis-6.1 -lvtkIOLSDyna-6.1 -lvtkIOLegacy-6.1 -lvtkIOMINC-6.1 -lvtkIONetCDF-6.1 -lvtkIOSQL-6.1 -lvtksys-6.1 -lvtkpng-6.1
Here is part of the error I'm getting
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char) in libvtksys-6.1.a(SystemTools.cxx.o)
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libvtksys-6.1.a(SystemTools.cxx.o)
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*) in libvtksys-6.1.a(SystemTools.cxx.o)
and
_vtk_png_reset_zstream in libvtkpng-6.1.a(png.c.o)
ld: symbol(s) not found for architecture x86_64
> Date: Thu, 23 Jul 2015 16:36:21 -0400
> From: ben.boeckel at kitware.com
> To: the.1.lily at hotmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] Error Linking VTK to my code "ld: symbol(s) not found for architecture x86_64"
>
> 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)
> <snip>
>
> What's the link line you're using? You're likely missing -lvtkpng-6.1.
>
> --Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150725/482fd118/attachment.html>
More information about the vtkusers
mailing list