Problem with dbus on windows 7
-
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 ?
-
Hi,
What do you mean by "perfectly accessible" ? In the same folder os qdbusviewer ?
-
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
-
Good catch !
However you shouldn't need the .dll suffix
-
Then you should also update the thread title prepending [solved] so other forum users may know a solution has been found :)