I am trying to building my project using waf.The Project is complied properly but there is some link error.Its fails to link to with the Resources file (.qrc file)

Qt Code:
  1. main.cpp.1.o: In function main': /home/sobingt/project/masterdetail/build/../main.cpp:20: undefined reference toqInitResources_masterdetail()'
To copy to clipboard, switch view to plain text mode 

WAF output --zones=deps

Qt Code:
  1. sobingt@tuneb03-System-Product-Name:~/projects/masterdetail$ ./waf --zones=deps
  2. Waf: Entering directory `/home/sobingt/projects/masterdetail/build'
  3. 10:49:34 deps deps for [/home/sobingt/projects/masterdetail/main.cpp]: [/home/sobingt/projects/masterdetail/mainwindow.h, /home/sobingt/projects/masterdetail/listmodel.h, /home/sobingt/projects/masterdetail/cache.h, /home/sobingt/projects/masterdetail/tablemodel.h, /home/sobingt/projects/masterdetail/mytablemodel.h]; unresolved ['QApplication', 'QPalette', 'QPixmap', 'QSplashScreen', 'qthread.h', 'boost/scoped_ptr.hpp', 'QMainWindow', 'QModelIndex', 'QAbstractListModel', 'QList', 'QVariant', 'tr1/unordered_map', 'QAbstractTableModel', 'QStringList', 'iostream', 'sstream', 'vector']
  4. 10:49:34 deps scanner for qxx: main.cpp -> build/main.cpp.1.o returned [/home/sobingt/projects/masterdetail/mainwindow.h, /home/sobingt/projects/masterdetail/listmodel.h, /home/sobingt/projects/masterdetail/cache.h, /home/sobingt/projects/masterdetail/tablemodel.h, /home/sobingt/projects/masterdetail/mytablemodel.h] ['QApplication', 'QPalette', 'QPixmap', 'QSplashScreen', 'qthread.h', 'boost/scoped_ptr.hpp', 'QMainWindow', 'QModelIndex', 'QAbstractListModel', 'QList', 'QVariant', 'tr1/unordered_map', 'QAbstractTableModel', 'QStringList', 'iostream', 'sstream', 'vector']
  5. [14/15] qxx: main.cpp -> build/main.cpp.1.o
  6. [15/15] cxxprogram: build/main.cpp.1.o build/mainwindow.cpp.1.o build/masterdetail_rc.o build/cache.cpp.1.o build/listmodel.cpp.1.o build/model.cpp.1.o build/mysortfilterproxymodel.cpp.1.o build/mytablemodel.cpp.1.o build/song.cpp.1.o build/songitem.cpp.1.o build/songs.cpp.1.o build/tablemodel.cpp.1.o build/tableproxymodel.cpp.1.o -> build/app
  7. main.cpp.1.o: In function `main':
  8. /home/sobingt/projects/masterdetail/build/../main.cpp:20: undefined reference to `qInitResources_masterdetail()'
  9. main.cpp.1.o: In function `~MainWindow':
  10. /home/sobingt/projects/masterdetail/build/../mainwindow.h:22: undefined reference to `vtable for MainWindow'
  11. /home/sobingt/projects/masterdetail/build/../mainwindow.h:22: undefined reference to `vtable for MainWindow'
  12. mainwindow.cpp.1.o: In function `MainWindow':
  13. /home/sobingt/projects/masterdetail/build/../mainwindow.cpp:22: undefined reference to `vtable for MainWindow'
  14. /home/sobingt/projects/masterdetail/build/../mainwindow.cpp:22: undefined reference to `vtable for MainWindow'
  15. mainwindow.cpp.1.o: In function `ListItem':
  16. /home/sobingt/projects/masterdetail/build/../listmodel.h:14: undefined reference to `vtable for ListItem'
  17. mainwindow.cpp.1.o: In function `MainWindow::tr(char const*, char const*)':
  18. /home/sobingt/projects/masterdetail/build/../mainwindow.h:24: undefined reference to `MainWindow::staticMetaObject'
  19. mainwindow.cpp.1.o: In function `SongItem':
  20. /home/sobingt/projects/masterdetail/build/../songitem.h:17: undefined reference to `vtable for SongItem'
  21. listmodel.cpp.1.o: In function `ListModel':
  22. /home/sobingt/projects/masterdetail/build/../listmodel.cpp:7: undefined reference to `vtable for ListModel'
  23. listmodel.cpp.1.o: In function `~ListModel':
  24. /home/sobingt/projects/masterdetail/build/../listmodel.cpp:27: undefined reference to `vtable for ListModel'
  25. mysortfilterproxymodel.cpp.1.o: In function `MySortFilterProxyModel':
  26. /home/sobingt/projects/masterdetail/build/../mysortfilterproxymodel.cpp:4: undefined reference to `vtable for MySortFilterProxyModel'
  27. mytablemodel.cpp.1.o: In function `MyTableModel':
  28. /home/sobingt/projects/masterdetail/build/../mytablemodel.cpp:3: undefined reference to `vtable for MyTableModel'
  29. tablemodel.cpp.1.o: In function `TableModel':
  30. /home/sobingt/projects/masterdetail/build/../tablemodel.cpp:9: undefined reference to `vtable for TableModel'
  31. collect2: ld returned 1 exit status
  32. Waf: Leaving directory `/home/sobingt/projects/masterdetail/build'
  33. Build failed
  34. -> task failed (exit status 1):
  35. {task 14658768: cxxprogram main.cpp.1.o,mainwindow.cpp.1.o,masterdetail_rc.o,cache.cpp.1.o,listmodel.cpp.1.o,model.cpp.1.o,mysortfilterproxymodel.cpp.1.o,mytablemodel.cpp.1.o,song.cpp.1.o,songitem.cpp.1.o,songs.cpp.1.o,tablemodel.cpp.1.o,tableproxymodel.cpp.1.o -> app}
  36. ['/usr/bin/g++', 'main.cpp.1.o', 'mainwindow.cpp.1.o', 'masterdetail_rc.o', 'cache.cpp.1.o', 'listmodel.cpp.1.o', 'model.cpp.1.o', 'mysortfilterproxymodel.cpp.1.o', 'mytablemodel.cpp.1.o', 'song.cpp.1.o', 'songitem.cpp.1.o', 'songs.cpp.1.o', 'tablemodel.cpp.1.o', 'tableproxymodel.cpp.1.o', '-o', '/home/sobingt/projects/masterdetail/build/app', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lQtCore', '-lQtGui', '-lQtCore', '-lQtOpenGL', '-lQtGui', '-lQtCore', '-lQtSvg', '-lQtGui', '-lQtCore', '-lQtSql', '-lQtCore', '-lQtUiTools', '-lQtXml', '-lQtCore', '-lQtScript', '-lQtCore']
To copy to clipboard, switch view to plain text mode 

wscript file

Qt Code:
  1. VERSION='0.0.1'
  2. APPNAME='qt4_test'
  3.  
  4. top = '.'
  5. out = 'build'
  6.  
  7. def options(opt):
  8. opt.load('compiler_cxx qt4')
  9.  
  10. def configure(conf):
  11. conf.load('compiler_cxx qt4')
  12. conf.env.append_value('CXXFLAGS', ['-g']) # test
  13.  
  14. def build(bld):
  15. def build(bld):
  16. bld(
  17. features = 'qt4 cxx',
  18. uselib = 'QTCORE QTGUI QTOPENGL QTSVG QWIDGET QTSQL QTUITOOLS QTSCRIPT',
  19. includes = bld.env.INCLUDES_QTGUI,
  20. source = 'mainwindow.cpp masterdetail.qrc cache.cpp listmodel.cpp model.cpp mysortfilterproxymodel.cpp mytablemodel.cpp song.cpp songitem.cpp songs.cpp tablemodel.cpp tableproxymodel.cpp',
  21. target = 'mainwindow.o',
  22. )
  23. bld(
  24. features = 'qt4 cxx cxxprogram',
  25. uselib = 'QTCORE QTGUI QTOPENGL QTSVG QWIDGET QTSQL QTUITOOLS QTSCRIPT',
  26. includes = bld.env.INCLUDES_QTGUI,
  27. source = 'main.cpp',
  28. target = 'app',
  29. use = 'mainwindow.o',
  30.  
  31. )
To copy to clipboard, switch view to plain text mode 

project file structure

Qt Code:
  1. ├── build
  2. │ ├── c4che
  3. │ │ ├── build.config.py
  4. │ │ └── _cache.py
  5. │ ├── config.log
  6. │ ├── main.cpp.1.o
  7. │ ├── masterdetail_rc.cpp
  8. │ └── masterdetail_rc.o
  9. ├── cache.cpp
  10. ├── cache.h
  11. ├── images
  12. │ ├── betaLogo.png
  13. │ ├── exitButton.gif
  14. │ ├── icon.png
  15. │ ├── image.png
  16. │ ├── mas.png
  17. │ ├── play.png
  18. │ ├── saveButton.png
  19. │ ├── stopbutton.png
  20. │ └── stop.png
  21. ├── listmodel.cpp
  22. ├── listmodel.h
  23. ├── main.cpp
  24. ├── mainwindow.cpp
  25. ├── mainwindow.h
  26. ├── Makefile
  27. ├── masterdetail64.png
  28. ├── masterdetail80.png
  29. ├── masterdetail.desktop
  30. ├── masterdetail_harmattan.desktop
  31. ├── masterdetail.pro
  32. ├── masterdetail.pro.user
  33. ├── masterdetail.qrc
  34. ├── masterdetail.svg
  35. ├── model.cpp
  36. ├── model.h
  37. ├── mysortfilterproxymodel.cpp
  38. ├── mysortfilterproxymodel.h
  39. ├── mytablemodel.cpp
  40. ├── mytablemodel.h
  41. ├── repository.db
  42. ├── song.cpp
  43. ├── song.h
  44. ├── songitem.cpp
  45. ├── songitem.h
  46. ├── songs.cpp
  47. ├── songs.h
  48. ├── tablemodel.cpp
  49. ├── tablemodel.h
  50. ├── tableproxymodel.cpp
  51. ├── tableproxymodel.h
  52. ├── tableUnit.cpp
  53. ├── waf
  54. ├── waf-1.6.11
  55. ├── wscript
To copy to clipboard, switch view to plain text mode