[vtkusers] Linker Error vtkCharts and BUILD_SHARED_LIBS

Hagen Mölle h.moelle at googlemail.com
Wed May 30 08:04:07 EDT 2012


Hi,

I recently migrated from vtk5.8 to vtk5.10. I compiled/linked vtk5.10 with BUILD_SHARED_LIBS enabled.

When compiling my own program I receive the following linker error.

../externals/libvtk/libvtk.a(CVTKMyChartXY.cpp.o): In function `CVTKMyChartXY::MouseButtonReleaseEvent(vtkContextMouseEvent const&)':
CVTKMyChartXY.cpp:(.text+0x5f8f): undefined reference to `vtkContextMouseEvent::GetModifiers() const'
CVTKMyChartXY.cpp:(.text+0x5fbf): undefined reference to `vtkContextMouseEvent::GetModifiers() const'
../externals/libvtk/libvtk.a(CVTKMyChartXY.cpp.o): In function `CVTKMyChartXY::KeyPressEvent(vtkContextKeyEvent const&)':
CVTKMyChartXY.cpp:(.text+0x700e): undefined reference to `vtkContextKeyEvent::GetKeyCode() const'

When compiling/linking vtk5.10 with BUILD_SHARED_LIBS disabled my own program links without problems.

This problem occurs on Windows XP, Windows 7, Ubuntu 10.04, Ubuntu 12.04.

I briefly looked at the source code of vtkContextKeyEvent and vtkContextMouseEvent. I could not find anything suspicious.

Before I make a bug report I wanted to know, do I need to add any special things to my own project when building vtk with BUILD_SHARED_LIBS enabled?

Thanks for your help,

Hagen


More information about the vtkusers mailing list