timmu
22nd February 2011, 09:00
Hi,
I'm using Qt4.4.3 (compiled statically from source and it works) to compile a program statically using plugins. I have previously been able to do this but now I'm getting error messages. Here's what I'm doing:
My main.cpp defines plugins like this:
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qtiff)
My hfile.h looks like this:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += staticlib
QTPLUGIN += qjpeg \
qgif \
qtiff
# Input
HEADERS += hfile.h draw.cpp rubberband.cpp cluster.cpp cluster2.cpp batch.cpp
SOURCES += batch.cpp cluster.cpp cluster2.cpp draw.cpp main.cpp rubberband.cpp
When I compile this I get the following error messages:
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qtiff()'
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qgif()'
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qjpeg()'
Does anyone have ideas as to what is happening? It must be some small thing because I have been able to compile the same program on the same computer before using the same static system. THANKS SO MUCH!
I'm using Qt4.4.3 (compiled statically from source and it works) to compile a program statically using plugins. I have previously been able to do this but now I'm getting error messages. Here's what I'm doing:
My main.cpp defines plugins like this:
Q_IMPORT_PLUGIN(qjpeg)
Q_IMPORT_PLUGIN(qgif)
Q_IMPORT_PLUGIN(qtiff)
My hfile.h looks like this:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += staticlib
QTPLUGIN += qjpeg \
qgif \
qtiff
# Input
HEADERS += hfile.h draw.cpp rubberband.cpp cluster.cpp cluster2.cpp batch.cpp
SOURCES += batch.cpp cluster.cpp cluster2.cpp draw.cpp main.cpp rubberband.cpp
When I compile this I get the following error messages:
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qtiff()'
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qgif()'
.../src/corelib/global/global.h undefined rerefence to 'qt_plugin_instance_qjpeg()'
Does anyone have ideas as to what is happening? It must be some small thing because I have been able to compile the same program on the same computer before using the same static system. THANKS SO MUCH!