Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Problem with dbus on windows 7

Problem with dbus on windows 7

Scheduled Pinned Locked Moved 3rd Party Software
7 Posts 2 Posters 3.9k Views
  • 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.
  • S Offline
    S Offline
    skylendar
    wrote on last edited by
    #1

    Hi there and thx for reading and answering if you can.

    I successfully compiled qt 5.4 and dbus 1.8 on windows 7 with mingw-64. The Qt5DBus.dll has been compiled and installed.with the rest of the qt stuff.

    I can launch the dbus daemon with dbus-launch, connect to it with dbus-monitor, however, neither qdbusviewer nor qdbus can connect to the daemon. That being said, qdbus even returns:

    Could not connect to D-Bus server: Unable to load dbus librarries.
    However, the libdbus-1.dll is perfectly accessible.

    What's wrong ? Any indea ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What do you mean by "perfectly accessible" ? In the same folder os qdbusviewer ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        skylendar
        wrote on last edited by
        #3

        yes, and I also tested another <listen> field in the dbus session.conf with

        tcp:host=127.0.0.1,port=1234

        but no way. It doesn't work

        1 Reply Last reply
        0
        • S Offline
          S Offline
          skylendar
          wrote on last edited by
          #4

          Found something !!!

          In the file qdbus_symbols.cpp, from the qt 5.4 sources, go to line 88 and change:
          @lib->setFileName(QLatin1String("dbus-1"));@

          to:

          @#ifdef Q_OS_WIN
          lib->setFileName(QLatin1String("libdbus-1.dll"));
          #else
          lib->setFileName(QLatin1String("dbus-1"));
          #endif@

          I dunno why QLibrary::setFileName() is unable to load the correct dll

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Good catch !

            However you shouldn't need the .dll suffix

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • S Offline
              S Offline
              skylendar
              wrote on last edited by
              #6

              I don't even need to modify the qt source.

              Just rename libdbus-1.dll to dbus-1.dll . That's all :-)

              This small trick could be useful to other devels, since I'm not the only one to strive to port a linux app to win.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Then you should also update the thread title prepending [solved] so other forum users may know a solution has been found :)

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                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