[vtkusers] Re: supplement: QVTK with vtk 5.0.3 and Qt 4.3.2

clinton at elemtech.com clinton at elemtech.com
Thu Oct 11 12:43:33 EDT 2007


On Thursday 11 October 2007 10:32:49 am Ruben Schilling wrote:
> Hi again,
>
> I just saw, that actually switching in the ccmake configuration
>
> BUILD_SHARED_LIBS               *OFF
> and adding a '-static' to the CXXFLAGS
>
> does not prevent vtk 5.0.3 from being built as a shared library! What is
> wrong with this? Can I specify a static library otherwise with ccmake?

VTK is built as a static libraries.  The one library you're having problems 
with is a Qt Designer *plugin* which is supposed to be shared.
In VTK 5.0, the plugin linked with VTK, which led to link errors on some 
systems, like you're seeing.  Which is linking non-PIC objects (that's the 
static VTK libraries), with a shared library (that's the Qt Designer plugin).  
Two possible workarounds are to add -fPIC as the linker error suggested, or 
build VTK as shared libraries.
This issue has already been fixed in the CVS version of VTK.  So if you want 
to use that, you can.

Clint



More information about the vtkusers mailing list