I have Qt5
project that successfully compiled against shared
Qt libraries, but I get a lot of errors (about 130 errors) like * error: multiple definition of 'XXX'
when compile it against static
Qt libraries:
/usr/local/Qt-5.3.0/lib/libQt5Quick.a(qquickanimation.o): In function `_q_interpolateShortestRotation(double&, double&, double)':
qquickanimation.cpp:(.text+0x330): multiple definition of `_q_interpolateShortestRotation(double&, double&, double)'
/usr/local/Qt-5.3.0/lib/libQt5Declarative.a(qdeclarativeanimation.o):qdeclarativeanimation.cpp:(.text+0xd80): first defined here
/usr/local/Qt-5.3.0/lib/libQt5Quick.a(qquickanimation.o): In function `_q_interpolateClockwiseRotation(double&, double&, double)':
qquickanimation.cpp:(.text+0x3c0): multiple definition of `_q_interpolateClockwiseRotation(double&, double&, double)'
/usr/local/Qt-5.3.0/lib/libQt5Declarative.a(qdeclarativeanimation.o):qdeclarativeanimation.cpp:(.text+0xe10): first defined here
Almost all multiple definitions detected in pairs:
- libQt5Declarative, libQt5Quick
- libQt5Declarative, libQt5Qml
I need to libQt5Declarative
only for using MessageDialog
in my qml
My .pro
file:
QT += quick declarative widgets network xml xmlpatterns multimedia
TARGET = MyApp
TEMPLATE = app
SOURCES += ...
HEADERS += ...
OTHER_FILES += ...
RESOURCES += ...
CONFIG += static
My questions are:
- Why it successfully compiles against shared Qt, but fails when I compile against static Qt?
- Is this possible to use declarative and quick modules simultaneously?
- I compiled static Qt libraries by myself and maybe I done this incorrect, Is Qt have official static libraries package?