Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Strange error, when use debug mode it's trying to link dlls from release, when in release - from debug

Strange error, when use debug mode it's trying to link dlls from release, when in release - from debug

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 5 Posters 7.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    webstylemedia
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • W Offline
      W Offline
      webstylemedia
      wrote on last edited by
      #2

      Also found that this is happened with all qtmobility examples. What can be wrong? Please help.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Marcelo Barros
        wrote on last edited by
        #3

        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 install

        configure -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""

        1 Reply Last reply
        0
        • M Offline
          M Offline
          michael.goddard
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • W Offline
            W Offline
            webstylemedia
            wrote on last edited by
            #5

            Yes, guys still dunno how to fix this issue. Maybe someone can help. Looks like qtmobility is very very unstable thing. :-(

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Smar
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                brucewuu
                wrote on last edited by
                #7

                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 .

                wish all the best to you from
                bruce wuu
                Autodesk China Inc.
                SW Developer
                M&E Product Developerment Group
                Work 137 6411 8921
                bruce.wu@autodesk.com

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved