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

Ruben Schilling r.b.schilling at googlemail.com
Fri Oct 12 05:34:42 EDT 2007


Hi Clint,

thanks again for your feedback, it was helpful. Just to give feedback:

Dynamic linking of vtk-5.0.3 release with QVTK on x86_64 seems to work,
except the example code below, which seems to be a version mismatch in Qt
versions I guess. The CVS version of vtk produces the same results, although
I was able to use static linking there. I hope the error below will not be
linked to some deeper error in the VTK/QVTK/Qt combination, but again, I
think it looks like a version mismatch (I was using Qt 4.3.2).

Best regards and thanks
Ruben

Linking CXX executable /scratch/local/schillin/VTKBuild/bin/qtimageviewer
/project/imaging/software/lib/libQtGui.a(qapplication_x11.o): In function
`qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned
long)':
qapplication_x11.cpp:(.text+0x10323): undefined reference to
`XFixesQueryExtension'
qapplication_x11.cpp:(.text+0x10360): undefined reference to
`XFixesQueryVersion'
/project/imaging/software/lib/libQtGui.a(qcursor_x11.o): In function
`QCursorData::update()':
qcursor_x11.cpp:(.text+0x252): undefined reference to `XFixesSetCursorName'
qcursor_x11.cpp:(.text+0x362): undefined reference to `XFixesSetCursorName'
/project/imaging/software/lib/libQtCore.a(qeventdispatcher_unix.o): In
function `QTimerInfoList::getTime(timeval&)':
qeventdispatcher_unix.cpp:(.text+0x517): undefined reference to
`clock_gettime'
collect2: ld returned 1 exit status
make[5]: *** [/scratch/local/schillin/VTKBuild/bin/qtimageviewer] Error 1
make[5]: Leaving directory
`/amd/hurtz/1/scratch/schillin/VTKBuild/Examples/All'
make[4]: *** [GUI/Qt/ImageViewer/CMakeFiles/qtimageviewer.dir/all] Error 2
make[4]: Leaving directory
`/amd/hurtz/1/scratch/schillin/VTKBuild/Examples/All'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/amd/hurtz/1/scratch/schillin/VTKBuild/Examples/All'
make[2]: *** [VTKExamples] Error 1
make[1]: *** [Examples/CMakeFiles/VTKExamplesTarget.dir/all] Error 2
make: *** [all] Error 2


2007/10/11, clinton at elemtech.com <clinton at elemtech.com>:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071012/1f5469c3/attachment.htm>


More information about the vtkusers mailing list