Hi guys,
i’m developing an QtQuick-Plugin in C++ and i have a problem with the deployment of my Plugin.
Both DLL’s (Debug and Release) are created.
When I try to use the Plugin whith an QmlViewer built in Release mode, it says the Plugin DLL is built in Debug mode and it can’t be used.
I already had a look inside the Release DLL with the DependencyWalker and it uses Qt Libraries in Release mode.
Does anybody know a solution?
Is there a problem with my project file or my make command?
My project directory is structured as follows:
- QtPlcConnectionPlugin (Project dir)
|- components
| |- plugin
| | |- qmldir
| | |- QtPlcConnectionPlugin.dll
| | |- QtPlcConnectionPlugind.dll
| | |- QtPlcConnectionPlugind.pdb
| |- DInt.qml
| |- Int.qml
| |- Plc.qml
| |- PlcStatus.qml
| |- qmldir
| |- SInt.qml
| |- UdInt.qml
| |- UInt.qml
| |- UsInt.qml
| |
|- dint.cpp
|- dint.h
|- int.cpp
|- int.h
|- plc.cpp
|- plc.h
|- plcclient.cpp
|- plcclient.h
|- plcstatus.cpp
|- plcstatus.h
...
Here my project file:
TEMPLATE = lib
CONFIG += qt plugin
CONFIG += debug_and_release
CONFIG += build_all
QT += declarative
QT += script
QT += network
TARGET = QtPlcConnectionPlugin
DESTDIR = components/plugin
OBJECTS_DIR = obj
MOC_DIR = moc
DEFINES += EXPORT_DLL
# Input
SOURCES += \
qtplcconnectionplugin.cpp \
variable.cpp \
udint.cpp \
plcstatus.cpp \
plcclient.cpp \
dint.cpp \
int.cpp \
uint.cpp \
sint.cpp \
usint.cpp \
symbol.cpp \
plc.cpp
HEADERS += \
qtplcconnectionplugin.h \
udint.h \
plcstatus.h \
plcclient.h \
dint.h \
variable.h \
int.h \
uint.h \
sint.h \
usint.h \
QtPlcConnectionPlugin_global.h \
symbol.h \
plc.h
QML_FILES = \
components/PlcStatus.qml \
components/DInt.qml \
components/Int.qml \
components/SInt.qml \
components/UdInt.qml \
components/UInt.qml \
components/UsInt.qml \
components/QtPlcServer.qml \
components/Plc.qml
QML_DIR1 = \
components/qmldir
QML_DIR2 = \
components/plugin/qmldir
TARGETPATH = QtPlcConnectionPlugin/plugin
symbian {
INSTALL_IMPORTS = /resource/qt/imports
} else {
isEmpty(INSTALL_IMPORTS):INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
}
target.path = $$INSTALL_IMPORTS/$$TARGETPATH
win32 {
CONFIG(debug, debug|release) {
TARGET = $$member(TARGET, 0)d
}
}
# qml
# && qmldirs
TARGETPATH = QtPlcConnectionPlugin
symbian {
INSTALL_IMPORTS = /resource/qt/imports
} else {
isEmpty(INSTALL_IMPORTS):INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
}
qmlfiles.files = $$QML_FILES
qmlfiles.sources = $$QML_FILES
qmlfiles.path = $$INSTALL_IMPORTS/$$TARGETPATH
qmldir1.files = $$QML_DIR1
qmldir1.sources = $$QML_DIR1
qmldir1.path = $$INSTALL_IMPORTS/$$TARGETPATH
qmldir2.files = $$QML_DIR2
qmldir2.sources = $$QML_DIR2
qmldir2.path = $$INSTALL_IMPORTS/$$TARGETPATH/plugin
INSTALLS += qmlfiles qmldir1 qmldir2
symbian {
DEPLOYMENT += qmlfiles qmldir1 qmldir2
}
OTHER_FILES += \
components/Plc.qml
My Build Steps:
//Debug
qmake.exe D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin\QtPlcConnectionPlugin.pro -r -spec win32-msvc2010 "CONFIG+=declarative_debug"
jom.exe D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin
jom.exe install D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin
//Release
qmake.exe D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin\QtPlcConnectionPlugin.pro -r -spec win32-msvc2010 "CONFIG+=release"
jom.exe D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin
jom.exe install D:\Qt\projects\AdvancedAniVisu\QtPlc\QtPlcConnectionPlugin
I’m using Qt 4.8.4 with Creator 2.5.2 on WinXP.
Greez
Mark
↧