Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qt 5.1.0-rc1 Windows 8: Qml plugin cannot be loaded

    QML and Qt Quick
    1
    3
    2075
    Loading More Posts
    • 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.
    • N
      net.user last edited by

      Hello,

      I wrote an application for linux and windows platforms. My development platform is linux - everything compiles fine and works as expected. Now I've compiled my project with msvc11 under windows 8 with no compile errors. When I start my application through the .exe file or the qmlscene.exe, I get an error, that my custom qml module cannot be loaded...

      my steps on linux:

      cd /to/project

      qmake CONFIG-=debug CONFIG+=release

      make

      cd gui

      export QML_IMPORT_TRACE=1

      qmlscene main.qml

      relevant output:
      QQmlImports(file:///path/to/myproject/gui/main.qml)::importExtension: loaded "/path/to/myproject/plugins/qmldir"
      QQmlImportDatabase::importPlugin: ".path.to.myproject.plugins" from "/path/to/myproject/plugins/libQmlPlugin.so"
      Module '.path.to.myproject.plugins' does not contain a module identifier directive - it cannot be protected from external registrations.
      => My application runs fine...

      my steps on windows:

      • open Qt developer console
      • call vcvarsall.bat in msvc dir

      cd /to/project

      qmake CONFIG-=debug CONFIG+=release

      jom

      cd gui

      set QML_IMPORT_TRACE=1

      qmlscene main.qml

      relevant output:
      QQmlImports(file:///C:/path/to/myproject/gui/main.qml)::addFileImport: "../plugins" 1.0 as "" QmlImports(file:///C:/path/to/myproject/gui/main.qml)::importExtension: loaded "C:/path/to/myproject/plugins/qmldir"
      QQmlImportDatabase::importPlugin: "C:.path.to.myproject.plugins" from "C:/path/to/myproject/plugins/QmlPlugin.dll" file:///C:/path/to/myproject/gui/main.qml:5 plugin cannot be loaded for module "C:.path.to.myproject.plugins": Cannot load library C:/path/to/myproject/plugins/QmlPlugin.dll: Das angegebene Modul wurde nicht gefunden.
      => I'm not sure, why the last message is in my native language, but qmlscene.exe doesn't start.
      I've tried:

      • a lot tips from google, which ended in a new project (files-and-path) structure. Copied the new sources back to linux, compiled them and started the project - everything works fine!
      • set QML_IMPORT_PATH=C:\path\to\myproject{gui,plugins}

      • set the include path parameter from qmlscene.exe (-I)

      Any suggestions?

      1 Reply Last reply Reply Quote 0
      • N
        net.user last edited by

        My current project structure looks like this (similar to the TimeExample):

        @- MyProject
        - Bin
        - MyProject.exe
        - Gui
        - main.cpp
        - main.qml
        - gui.pro
        - Imports
        - Core
        - my widgets, scripts, ...
        - qmldir
        - MyQmlPlugin.dll
        - MyQmlPlugin
        - my sources
        - myqmlplugin.pro@

        I also added the following line to my main.cpp:
        @view.engine()->addImportPath("../Imports");@
        A qDebug() on the import path list shows me, that my path is included...

        Everything compiles and run fine --- !!! on my linux box !!! ---.
        On windows everything compiles, too. But on starting with MyProject.exe, "qmlscene main.qml" or QtCreator, the application quits with the following error:
        @file:///C:/MyProject/Gui/main.qml:2 plugin cannot be loaded for module "Core": Cannot load library C:/MyProject/Imports/Core/MyQmlPlugin.dll: Das angegebene Modul wurde nicht gefunden.@

        Any hints? Or is this a bug?

        1 Reply Last reply Reply Quote 0
        • N
          net.user last edited by

          i've pushed the current project to "bitbucket":https://bitbucket.org/cidxxiii/lotti

          can a windows developer help me to figure out, why the project doesn't run on windows, please?

          (the required boost binaries can be found "here":http://sourceforge.net/projects/boost/files/boost-binaries/1.54.0/

          thanks for your help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post