Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 5.1.0-rc1 Windows 8: Qml plugin cannot be loaded

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

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 1 Posters 2.3k 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.
  • N Offline
    N Offline
    net.user
    wrote on last edited by
    #1

    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
    0
    • N Offline
      N Offline
      net.user
      wrote on last edited by
      #2

      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
      0
      • N Offline
        N Offline
        net.user
        wrote on last edited by
        #3

        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
        0

        • Login

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