View Full Version : QML plugin don’t work while using QDeclarativeView to load can work

12th July 2011, 08:20
today I tried the demo QML plugin of qt on winows 7 ×64 , it is in examples/declarative/tutorials/extending/chapter6-plugins ,
at first I build with qmake , mingw32-make , it said error
libsupc++/vterminate.cc:91: undefined reference to `_imp___iob’
and I searched it with google , and found some people meet the same problem , and the solution is to copy this project to other disc , then
I copy to E://qt/demo , and build with qmake , mingw32-make , and but still it doesn’t work , it seems everything is right , I can get the
dll output in lib , while when I run app.qml , it said PieChart is not a type “PieChart” .
then I tried to build them in main.cpp, see main.cpp

#include <QtDeclarative/QtDeclarative>
#include <QtGui/QtGui>
#include "piechart.h"
#include "pieslice.h"

int main(int argc,char **argv)
QApplication app(argc,argv);
QDeclarativeView view;
return app.exec();

and Tested , it works , why the plugins don’t work , while using QDeclarativeView to load them can work .