Why qt dbus can not be compiled correctly
-
I want to compile qt dbus project on windows 7 platform with msvc2010 compiler. this project depend on winDBus library. so I downloaded winDBus and compiled it successfully. then I went to QtDir-->SRC-->dbus directory. opened dbus.pro with Qt Creator, modified INCLUDEPATH and LIBS_PRIVATE with my winDBus's include and library path respectively. everything seems ok and I began to compile. then QtDBus4.dll and QtDBus4.lib are generated. but when I use it in my another project. It reported LNK error, I went back to check the Qt dbus compiling process, there are some errors about moc:
@
...
qdbusabstractinterface.h(0): Note: No relevant classes found. No output generated.
...
qdbuspendingcall.h(0): Note: No relevant classes found. No output generated.
...
qdbusservicewatcher.h(0): Note: No relevant classes found. No output generated.
...
qdbusconnectioninterface.h(0): Note: No relevant classes found. No output generated.
...the MOC command generated by Creator is like bellow:
d:\Qt\4.8.6\bin\moc.exe -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -DQT_BUILD_DBUS_LIB -DDBUS_API_SUBJECT_TO_CHANGE -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_DLL -DQT_XML_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"....\include\QtCore" -I"....\include\QtXml" -I"....\include" -I"....\include\QtDBus" -I"d:\winDBus" -I"tmp" -I"....\include\ActiveQt" -I"debug" -I"....\mkspecs\win32-msvc2010" -D_MSC_VER=1600 -DWIN32 qdbusabstractinterface.h -o debug\moc_qdbusabstractinterface.cpp
@I copy this command to command window and run it directly, it generated the same error warnning:
qdbusabstractinterface.h(0): Note: No relevant classes found. No output generated.
and the moc_qdbusabstractinterface.cpp is 0Kbut if I removed -I"....\include", there is no error warning again, and the generated moc_qdbusabstractinterface.cpp is 4K
so what is the matter, why the inlude path can affect the mocing? then I put the -I"....\include" on the first place and on the last place of the whole include path to try to moc respectively. error warning still exist only if the -I"....\include" in the including path.
who can tell me why? thanks so much