Hello experts.
This is my project. It's a Symbian project:

.PRO:

Qt Code:
  1. folder_01.source = qml/GCleaner
  2. folder_01.target = qml
  3. DEPLOYMENTFOLDERS = folder_01
  4. symbian:TARGET.CAPABILITY += NetworkServices
  5. CONFIG += qt
  6. CONFIG += qt-components
  7. SOURCES += main.cpp
  8. QT += declarative
  9. files.sources += main.qml
  10. DEPLOYMENT += files
  11. include(qmlapplicationviewer/qmlapplicationviewer.pri)
  12. qtcAddDeployment()
To copy to clipboard, switch view to plain text mode 

CPP:

Qt Code:
  1. #include <QtGui/QApplication>
  2. #include "qmlapplicationviewer.h"
  3. #include <QObject>
  4. #include <QApplication>
  5. #include <QDeclarativeView>
  6. #include <QDeclarativeContext>
  7. #include <QDir>
  8. #include <QFile>
  9.  
  10. void deleteDir(const std::string& foldername)
  11. {
  12.  
  13. QDir dir;
  14. dir.rmdir(foldername.c_str());
  15. }
  16.  
  17. class Clean : public QObject {
  18. Q_OBJECT
  19. public:
  20. Clean(QObject *parent = 0);
  21.  
  22. Q_INVOKABLE void delete() {
  23. deleteDir(c:/temp)
  24. };
  25.  
  26. int main(int argc, char *argv[])
  27. {
  28. QApplication app(argc, argv);
  29.  
  30. Clean clean;
  31.  
  32. QDeclarativeView view;
  33. view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
  34. view.rootContext()->setContextProperty("Clean", &clean);
  35. view.setSource(QUrl("./main.qml"));
  36.  
  37. return app.exec();
  38. }
To copy to clipboard, switch view to plain text mode 

QML:

Qt Code:
  1. import QtQuick 1.1
  2. import com.nokia.symbian 1.1
  3.  
  4. Window {
  5. id: window
  6. Button {
  7. id:button
  8. onClicked: Clean.delete
  9. } }
To copy to clipboard, switch view to plain text mode 


It tells me that "undefined reference to `Clean::Clean(QObject*)' " and "undefined reference for `vtable for Clean'
I'm building this app for Symbian and I'm stuck at that. Please help me out.

My best regards,
George Dao.