Hello everybody,

Im busy with a new/old project that has to been used QT 4.2.0, I use the follow software to develop with QT:
Microsoft Visual C++ 2005 Express - V: 8.0.50727.42
QT 4.2.0 (Installed in D:\qt-win-4.2.0)

The follow environment variables in Windows XP are set:
QMAKESPEC => win32-msvc2005
PATH => D:\qt-win-4.2.0\lib;D:\qt-win-4.2.0\bin

In Microsoft Visual C++ 2005 Express in the Options dialog, At Project and Solutions, VC++ Directories, The follow directories are set:
LIBRARY: D:\qt-win-4.2.0\lib
(Visual Studio makefile returns: d:\qt-win-4.2.0\lib\qtmain.lib d:\qt-win-4.2.0\lib\QtGui4.lib d:\qt-win-4.2.0\lib\QtCore4.lib)

I've used a community patch for 4.2.X to configure this QT Release to enable it in Visual Studio 2005 Express, The follow problem when I try to compile my project in an release, It fails on many things that I do not follow.

I've got the follow directory structure:

src/images (My images I use within my program)
src/include (My included files to refer to in my source)
src/xmpp (Some connection header files and CPP's, Used by source)

src/ itselfs has several .h and .cpp and .ui files. The next few files are differents like my generated .PRO file:

Qt Code:
  1. ######################################################################
  2. # Automatically generated by qmake (2.01a) vr 15. feb 00:42:54 2008
  3. ######################################################################
  4.  
  5. TEMPLATE = app
  6. TARGET =
  7. DEPENDPATH += . include xmpp
  8. INCLUDEPATH += .
  9.  
  10. # Input
  11. HEADERS += aboutdialog.h \
  12. accountdialog.h \
  13. appdatachannel.h \
  14. chatdialog.h \
  15. editgroupsdialog.h \
  16. eventqueue.h \
  17. generaloptionswidget.h \
  18. loginpane.h \
  19. mainwindow.h \
  20. MinimizeToTray.h \
  21. nodetabwidget.h \
  22. nodetreewidget.h \
  23. options.h \
  24. optionsdialog.h \
  25. pluginmanager.h \
  26. pluginoptionswidget.h \
  27. rosterdomainview.h \
  28. rostergroupview.h \
  29. rosteronlineview.h \
  30. rosteroptionswidget.h \
  31. rosterpane.h \
  32. rosterplugin.h \
  33. rosterview.h \
  34. selectcontactdialog.h \
  35. systemmsgdialog.h \
  36. useraccount.h \
  37. include/conversation.h \
  38. include/node.h \
  39. include/plugin.h \
  40. include/roster.h \
  41. include/socket.h \
  42. include/urihandler.h \
  43. include/user.h \
  44. xmpp/dnssrv.h \
  45. xmpp/httpsproxy.h \
  46. xmpp/iqauth.h \
  47. xmpp/jabberauth.h \
  48. xmpp/proxy.h \
  49. xmpp/registerauth.h \
  50. xmpp/saslmd5.h \
  51. xmpp/saslmech.h \
  52. xmpp/saslplain.h \
  53. xmpp/socks5proxy.h \
  54. xmpp/sslsocket.h \
  55. xmpp/xmppauth.h \
  56. xmpp/xmppstream.h \
  57. xmpp/xmppversion.h \
  58. ../plugins/privacy/privacy.h \
  59. ../plugins/filetransfer/filetransfer.h
  60. FORMS += aboutdialog.ui \
  61. accountdialog.ui \
  62. editgroupsdialog.ui \
  63. generaloptionswidget.ui \
  64. logindialog.ui \
  65. optionsdialog.ui \
  66. pluginoptionswidget.ui \
  67. rosteroptionswidget.ui \
  68. selectcontactdialog.ui \
  69. systemmsgdialog.ui
  70. SOURCES += aboutdialog.cpp \
  71. accountdialog.cpp \
  72. appdatachannel_win.cpp \
  73. chatdialog.cpp \
  74. editgroupsdialog.cpp \
  75. eventqueue.cpp \
  76. generaloptionswidget.cpp \
  77. loginpane.cpp \
  78. main.cpp \
  79. mainwindow.cpp \
  80. MinimizeToTray.cpp \
  81. nodetabwidget.cpp \
  82. nodetreewidget.cpp \
  83. optionsdialog.cpp \
  84. pluginmanager.cpp \
  85. pluginoptionswidget.cpp \
  86. rosterdomainview.cpp \
  87. rostergroupview.cpp \
  88. rosteronlineview.cpp \
  89. rosteroptionswidget.cpp \
  90. rosterpane.cpp \
  91. rosterplugin.cpp \
  92. rosterview.cpp \
  93. selectcontactdialog.cpp \
  94. systemmsgdialog.cpp \
  95. useraccount.cpp \
  96. xmpp/dnssrv.cpp \
  97. xmpp/dnssrv_unix.cpp \
  98. xmpp/dnssrv_win.cpp \
  99. xmpp/httpsproxy.cpp \
  100. xmpp/iqauth.cpp \
  101. xmpp/proxy.cpp \
  102. xmpp/registerauth.cpp \
  103. xmpp/saslmd5.cpp \
  104. xmpp/saslplain.cpp \
  105. xmpp/socks5proxy.cpp \
  106. xmpp/sslsocket.cpp \
  107. xmpp/xmppauth.cpp \
  108. xmpp/xmppstream.cpp \
  109. xmpp/xmppversion.cpp
  110. RESOURCES += lol.qrc
To copy to clipboard, switch view to plain text mode 

When I open the "Visual Studio 2005 Command Prompt" and type: qmake -project within the src directory, it doesn't fail, Afterwartds, I do qmake -nomoc (That doesnt help since MSVC Solution Explorer gives alot of MOC_.....h or MOC_....Cpp files. When I do qmake -tp vc, it generates the .vcproj and I can open my project.

The follow debug is available from the VSMC IDE:
Qt Code:
  1. 1>------ Build started: Project: lol, Configuration: Release Win32 ------
  2. 1>RCC lol.qrc
  3. 1>MOC xmpp\xmppstream.h
  4. 1>MOC systemmsgdialog.h
  5. 1>MOC xmpp\sslsocket.h
  6. 1>MOC xmpp\socks5proxy.h
  7. 1>MOC selectcontactdialog.h
  8. 1>MOC rosterplugin.h
  9. 1>rosterplugin.h(69): Error: Undefined interface
  10. 1>Project : error PRJ0019: A tool returned an error code from "MOC rosterplugin.h"
  11. 1>lol - 1 error(s), 0 warning(s)
  12. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
To copy to clipboard, switch view to plain text mode 

nmake in the "Visual Studio 2005 Command Prompt" gives the follow debug:

Qt Code:
  1. Microsoft (R) Program Maintenance Utility Version 7.00.8882
  2. Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
  3.  
  4. nmake -f Makefile.Release
  5.  
  6. Microsoft (R) Program Maintenance Utility Version 7.00.8882
  7. Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
  8.  
  9. d:\qt-win-4.2.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DWIN32 -D_
  10. CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DQT_DLL -DQT_NO_DEBUG -DQT_
  11. GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"D:/qt-win-4.2.0/include/QtCore" -I"
  12. D:/qt-win-4.2.0/include/QtCore" -I"D:/qt-win-4.2.0/include/QtGui" -I"D:/qt-win-4
  13. .2.0/include/QtGui" -I"D:/qt-win-4.2.0/include" -I"." -I"D:/qt-win-4.2.0/include
  14. /ActiveQt" -I"release" -I"." -I"..\..\..\qt-win-4.2.0\mkspecs\win32-msvc2005" ma
  15. inwindow.h -o release\moc_mainwindow.cpp
  16. mainwindow.h(48): Error: Undefined interface
  17. NMAKE : fatal error U1077: 'd:\qt-win-4.2.0\bin\moc.exe' : return code '0x1'
  18. Stop.
  19. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
  20. make.exe"' : return code '0x2'
  21. Stop.
To copy to clipboard, switch view to plain text mode 
And if I exclude the 'mainwindow.cpp' another file will give an Undefined interface error.

How could I solve this and build my compiled EXE? Thank you.