Qt 5.1.0-rc1 Windows 8: Qml plugin cannot be loaded
-
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?
-
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?
-
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!