Strange error, when use debug mode it's trying to link dlls from release, when in release - from debug
-
Hello!
Have a very strange error, when running camera example in qtcreator.
When I use debug mode I get this error:
Running C:\Qt\QtMobility\1.1.0-beta2\examples\camera\debug\camera.exe...
QMediaPluginLoader: Failed to load plugin: "C:/Qt/4.7.0/qt/plugins/mediaservice/dsengine.dll" "The plugin 'C:/Qt/4.7.0/qt/plugins/mediaservice/dsengine.dll' uses incompatible Qt library. Expected build key "Windows mingw debug full-config", got "Windows mingw release full-config""When I use release mode I get opposite error:
Running C:\Qt\QtMobility\1.1.0-beta2\examples\camera\release\camera.exe...
QMediaPluginLoader: Failed to load plugin: "C:/Qt/4.7.0/qt/plugins/mediaservice/dsengined.dll" "The plugin 'C:/Qt/4.7.0/qt/plugins/mediaservice/dsengined.dll' uses incompatible Qt library. Expected build key "Windows mingw release full-config", got "Windows mingw debug full-config""I tried several tests, first tried to delete debug files from plugins/mediaservice when used release, and release dlls when used debug - no luck. Tried to rename dsengined to dsengine, and dsengine to dsengined. No luck. The same happens with other plugins - for audio for example - in release mode it's trying to link debug dll etc.
Please help me what I need to do to avoid this wrong linking?
I have Qt 4.7.0 and Qt Mobility 1.1.0-beta2.
Platform Windows Vista.
Thanks.
Dmitry
-
Also found that this is happened with all qtmobility examples. What can be wrong? Please help.
-
Same here. I compiled Qt Mobility 1.1.0-beta2 on Qt 4.7.0 using mingw:
- set path to Qt
- set path to perl
- set path to mingw
@configure -release
mingw32-make
mingw32-make installconfigure -debug
mingw32-make
mingw32-make install@it is possible to see some libs with the trailing "d", so I imagine debug and release versions are available. However, when compiling my application, I had the same error described here.
In my project file, I used:
@win32 {
INCLUDEPATH += C:\QtMobility\include
LIBS += -LC:\QtMobility\lib
}
@The error is:
QMediaPluginLoader: Failed to load plugin: "C:/QtMobility/plugins/mediaservice/dsengine.dll" "The plugin 'C:/QtMobility/plugins/mediaservice/dsengine.dll' uses incompatible Qt library. Expected build key "Windows mingw debug full-config", got "Windows mingw release full-config""
QMediaPluginLoader: Failed to load plugin: "C:/QtMobility/plugins/mediaservice/qtmedia_audioengine.dll" "The plugin 'C:/QtMobility/plugins/mediaservice/qtmedia_audioengine.dll' uses incompatible Qt library. Expected build key "Windows mingw debug full-config", got "Windows mingw release full-config"" -
Are you sure it's not trying to load all the plugins in that directory and just printing a warning for the ones that didn't load? Can you still use the examples ok?
-
Yes, guys still dunno how to fix this issue. Maybe someone can help. Looks like qtmobility is very very unstable thing. :-(
-
For my environment, I just use manually compiled Qt Mobility against the system Qt, and linking it to the application just by adding -lfoo -Lpath ...
@set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(QtMobility REQUIRED)@@
set(QT_MOBILITY_MODULES QtBearer QtContacts QtLocation QtMedia
QtPublishSubscribe QtSensors QtServiceFramework
QtSystemInfo QtVersit
)#find_path(MOBILITY_INCLUDE_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/
/usr/include
/usr/local/include
#)
INCLUDE(FindPackageHandleStandardArgs)
foreach(MOBILITY_MODULE ${QT_MOBILITY_MODULES})
string(TOUPPER ${MOBILITY_MODULE} _upper_mobi_module)
find_library(${_upper_mobi_module}_LIBRARY
NAMES ${MOBILITY_MODULE}
)
MARK_AS_ADVANCED(${_upper_mobi_module}_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QtMobility DEFAULT_MSG ${_upper_mobi_module}_LIBRARY)
endforeach()#FIND_PACKAGE_HANDLE_STANDARD_ARGS(QtMobility DEFAULT_MSG MOBILITY_INCLUDE_DIR)
#MARK_AS_ADVANCED(MOBILITY_INCLUDE_DIR)
@Your Qt paths are most likely wrong. I suggest using CMake and letting it to handle Qt paths for you if you can’t do it by hand with qmake.
-
I also meet such problems in desktop on windows 7 x64 , I downloaded the qt components , and try to build the plugins with qmake , mingw32-make , while I run the examples , it said
plugin cannot be loaded for module "C:.bruce.qt.qml.qtcomponent.desktop.components": The plugin 'C:/bruce/qt/qml/qtcomponent/desktop/components/plugin/styleplugin.dll' uses incompatible Qt library. Expected build key "Windows mingw release full-config", got "Windows mingw debug full-config"and even if I build the plugins with mingw32-make -f Makefile.Release , it still has the same error ,do you guys have similiar problems and anyone know how to solve this , maybe I need to configure qt source code in release mode , I think the plugins should not be so difficult to use .