[vtkusers] Static Qt and static VTK - is it possible?

Gib Bogle g.bogle at auckland.ac.nz
Thu Sep 23 22:50:21 EDT 2010


Is it expecting too much to make both Qt and VTK static?  On Windows with 
mingw-4.4.0 I built Qt-4.7.0 statically, and am now trying to build VTK 
statically.  I was not aware if it was necessary, or if so how to do it, to tell 
the CMake configure that the Qt libraries are static.  The VTK build proceeds as 
far as building QVTK, but gets a million errors when trying to create 
libQVTKWidgetPlugin.dll.  The first undefined reference is to WSAAsyncSelect at 16, 
and the following are to Qt functions.

[ 89%] Built target QVTK
Linking CXX shared library ..\..\bin\libQVTKWidgetPlugin.dll
Creating library file: ..\..\bin\libQVTKWidgetPlugin.dll.a
C:\Qt\4.7.0\lib\libQtCore.a(qeventdispatcher_win.o):qeventdispatcher_win.cpp:(.text+0x523): 
undefined reference to `WSAAsyncSelect at 16'
C:\Qt\4.7.0\lib\libQtGui.a(qwidget.o):qwidget.cpp:(.text+0x578a): undefined 
reference to `QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*)'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x28ef): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x2956): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x2b9b): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x2c0a): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x2d0b): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x2d72): more
  undefined references to `QBasicTimer::stop()' follow
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x37da): 
undefined reference to `QBasicTimer::start(int, QObject*)'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x384f): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x385d): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x3e5c): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x3e6a): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x4473): 
undefined reference to `QBasicTimer::stop()'
C:\Qt\4.7.0\lib\libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x4481): more
  undefined references to `QBasicTimer::stop()' follow

etc.



More information about the vtkusers mailing list