[vtkusers] Linker error in mac: symbol(s) not found

Sunrise helios.corona at gmail.com
Wed Jan 29 15:23:53 EST 2014


I have a linker problem in mac (it's fine in linux).

[ 86%] Building CXX object CMakeFiles/MyFilter.dir/moc_MyFilter_Plugin.cxx.o
Linking CXX shared library ../bin/libMyFilter.dylib
Undefined symbols for architecture x86_64:
  "vtkObjectBase::PrintHeader(std::__1::basic_ostream<char,
std::__1::char_traits<char> >&, vtkIndent)", referenced from:
      vtable for MyFilter in MyFilter.cxx.o
  "vtkObjectBase::PrintTrailer(std::__1::basic_ostream<char,
std::__1::char_traits<char> >&, vtkIndent)", referenced from:
      vtable for MyFilter in MyFilter.cxx.o
  "vtkDataSetAlgorithm::PrintSelf(std::__1::basic_ostream<char,
std::__1::char_traits<char> >&, vtkIndent)", referenced from:
      MyFilter::PrintSelf(std::__1::basic_ostream<char,
std::__1::char_traits<char> >&, vtkIndent) in MyFilter.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [../bin/libMyFilter.dylib] Error 1
make[1]: *** [CMakeFiles/MyFilter.dir/all] Error 2
make: *** [all] Error 2

and a basic PrintSelf implementation exists in MyFilter.cxx:

void MyFilter::PrintSelf(ostream &os,vtkIndent indent)
{
    this->Superclass::PrintSelf(os,indent);
}

I did include ${VTK_LIBRARIES} in target link libraries. I use mac
10.8.5 and ParaView development 4.1.0.
Any ideas how can I link my code would be appreciated.

Thanks.
-Sia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140129/205fc0ef/attachment.html>


More information about the vtkusers mailing list