[vtk-developers] libc++ problem on OSX

Robert Maynard robert.maynard at kitware.com
Wed Sep 17 14:17:21 EDT 2014


If my memory is correct CMake doesn't have explicit global objc or objc++
flag variables. Instead what you can try todo is to set the  COMPILE_FLAGS
 property on each mm file to be "-stdlib=libstdc++"

On Wed, Sep 17, 2014 at 2:07 PM, Biddiscombe, John A. <biddisco at cscs.ch>
wrote:

> For compatibility with some other libraries, I tried compiling paraview on
> OSX using libc++ instead of libstdc++.
> Everything is fine except some link errors coing from vtkCocoa… classes. I
> have never worked with these before, but see all the classes causing me
> trouble emanate from code which has an mm extension.
>
> Looking at the make rules, I cannot see anything obviously wrong, but does
> anyone know of a reason why the vtkCocoa classes cause this trouble. Are
> they using a libstdc++ from the system (via some cocoa related link) which
> I can’t work around?
>
> Thanks for any hints.
>
> JB
>
> Linking CXX shared library ../../../lib/libvtkRenderingOpenGL-pv4.2.dylib
> Undefined symbols for architecture x86_64:
>   "vtkObjectBase::PrintHeader(std::ostream&, vtkIndent)", referenced from:
>       vtable for vtkCocoaRenderWindowInteractor in
> vtkCocoaRenderWindowInteractor.mm.o
>       vtable for vtkCocoaRenderWindow in vtkCocoaRenderWindow.mm.o
>   "vtkObjectBase::PrintTrailer(std::ostream&, vtkIndent)", referenced from:
>       vtable for vtkCocoaRenderWindowInteractor in
> vtkCocoaRenderWindowInteractor.mm.o
>       vtable for vtkCocoaRenderWindow in vtkCocoaRenderWindow.mm.o
>   "vtkOpenGLRenderWindow::PrintSelf(std::ostream&, vtkIndent)", referenced
> from:
>       vtkCocoaRenderWindow::PrintSelf(std::ostream&, vtkIndent) in
> vtkCocoaRenderWindow.mm.o
>   "vtkRenderWindowInteractor::PrintSelf(std::ostream&, vtkIndent)",
> referenced from:
>       vtkCocoaRenderWindowInteractor::PrintSelf(std::ostream&, vtkIndent)
> in vtkCocoaRenderWindowInteractor.mm.o
>   "std::string::c_str() const", referenced from:
>       vtkCocoaRenderWindow::ReportCapabilities() in
> vtkCocoaRenderWindow.mm.o
>   "std::string::length() const", referenced from:
>       vtkCocoaRenderWindow::ReportCapabilities() in
> vtkCocoaRenderWindow.mm.o
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140917/b351edbd/attachment-0002.html>


More information about the vtk-developers mailing list