(Solved) Installing QtMobiliy.Location - plugin cannot be loaded for module (..) Cannot load library (..) The specified procedure could not be found



  • Hi,

    I am new to QT and I would like to write some Plugins for an existing program.
    So my goal is to get the program running on Windows under Eclipse.

    What I did until now:

    Comp. and Installation finished without errors and in the QT4 folder were files created concerning to QTLocation in the folders "include", "lib" and "plugins". So i think the installation itself was successful.

    Unfortunatelly, Eclipse still gives me the following error:
    D:\Daten\Eclipse\Testing\frontend\frontend.qml:23:1: module "QtMobility.location" is not installed

    The concerning line is: import QtMobility.location 1.2

    If I forgot any important information, please let me know.

    Chris



  • The Qt Location QML import plugin cannot be found. Either because it has not been installed or it is not installed to a location in the import search path. Check in the Qt imports directory for QtMobility/location/libdeclarative_location.dll. Or add the location of the Qt Location import plugin to the import path of the QDeclarativeEngine.



  • Thank you for your reply.

    In this folder C:\Qt\4.8.4\imports\QtMobility\location are declerative_location.dll and a declerative_locationd.dll present.

    How would the second way work exactly with QDeclarativeEngine?

    Do I have to add this anywhere? Where is the .pro file stored if Eclipse is used?
    CONFIG += mobility
    MOBILITY = location



  • @
    CONFIG += mobility
    MOBILITY = location
    @

    are only required if you are using Qt Location from C++. Try setting the environment variable QML_IMPORT_TRACE to 1 and look at the debug output when running your application.

    The second method I mentioned was to call QDeclarativeEngine::addImportPath(), but this doesn't seem necessary as the Qt Location import looks to be installed in the correct location.



  • Thanks again for your answer.

    The result shows:
    QDeclarativeImportDatabase::addImportPath: "C:\Qt\4.8.2\imports"
    QDeclarativeImportDatabase::addImportPath: "C:/Python27"

    The problem at that point: I have Qt 4.8.4 installed at C:\Qt\4.8.4....
    Where are the paths configured/set/read?

    After renaming the folder, the module is found but:
    QDeclarativeImportDatabase::importPlugin: "QtMobility.location" from "C:/Qt/4.8.2/imports/QtMobility/location/declarative_location.dll"
    D:\Daten\Eclipse\Testing\frontend\frontend.qml:23:1: plugin cannot be loaded for module "QtMobility.location": The plugin 'C:/Qt/4.8.2/imports/QtMobility/location/declarative_location.dll' uses incompatible Qt library. Expected build key "Windows msvc release full-config", got "Windows mingw release full-config"

    I am now trying it with the msvc release :)



  • You have two problems here. The first as you discovered is that the Qt version you have installed is not where it expects to be. Renaming the directory solved that. I don't know what could have caused this. The Qt libraries are patched at installation time with the install prefix.

    The second problem is that you are mixing msvc and mingw builds. I believe those compilers are not binary compatible. You need to build your application, Qt Location and Qt with the same compiler.



  • Compiling via msvc worked (as i found out: mscv was used for PySide, so I have to use it too)

    But now I get the following error:
    QDeclarativeImportDatabase::importPlugin: "QtMobility.location" from "C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll"
    D:\Daten\Eclipse\Testing\frontend\frontend.qml:23:1: plugin cannot be loaded for module "QtMobility.location": Cannot load library C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll: The specified procedure was not found.

    Analysing the above dll with Dependency Walker shows me that some dlls (e.g. ieshims.dll) are not found.

    Do you have any idea against that?



  • I don't get it...
    All dlls (except ieshims.dll, which seems not important at that point) are referenced and found correctly, but the above error still appears...



  • I don't recognize the ieshims.dll, is this a direct dependency of declarative_location.dll?

    You could try setting the environment variable QT_DEBUG_PLUGINS=1 but I suspect that will not shed any more light on the mater.



  • The ieshims.dll is no direct dependency, it is "at the bottom" of the dependency tree and concerning to Google search results it is normal that dependency walker highlights it.

    Dependency Walker prints:
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

    Unfortunately adding QT_DEBUG_PLUGINS just prints the error twice:
    QDeclarativeImportDatabase::importPlugin: "QtMobility.location" from "C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll"
    QLibraryPrivate::loadPlugin failed on "C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll" : "Cannot load library C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll: Die angegebene Prozedur wurde nicht gefunden."
    D:\Daten\Eclipse\Testing\frontend\frontend.qml:23:1: plugin cannot be loaded for module "QtMobility.location": Cannot load library C:/Qt/4.8.4/imports/QtMobility/location/declarative_location.dll: Die angegebene Prozedur wurde nicht gefunden.

    ("Die angegebene Prozedur wurde nicht gefunden." is German meaning The specified Procedure could not be found.)

    I also tried the compiled QTMobility.location dlls used by the developer of the program, with the same results.

    Furthermore I installed all the things on another laptop and in a VM - same problem. So could there be something I make always wrong? Should I try Visual Studio 2008 instead of Visual Studio 2010?



  • I can only think of two things left to try.

    install ieshims.dll on your system. If that is not possible, find out what library is pulling in ieshims.dll as a dependency, determine why it is needed and if it can be rebuilt without it as a dependency.



  • Thank you for your quick response.
    I added a path to the ieshims.dll (part of Internet Explorer) to the import path, now shlwapi.dll throws a warning. But I find even more results on Google, that this is no problem at all...



  • News:
    Switched to QT 4.7.4 and VS 2008, after someone from the QT Mobility Team told me that Qt Mobility was never tested with 4.8.4.
    Result: Import works :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.