Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why qt dbus can not be compiled correctly

Why qt dbus can not be compiled correctly

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 847 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    victorswan
    wrote on last edited by
    #1

    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 0K

    but 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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved