Xbehave
January 14th, 2010, 02:31 PM
Ok so i can't really program in c++, but i was trying to track down a bug and wanted to compile a sample of a program
#include <QDBusInterface>
#include <QDBusMetaType>
#include <QDBusReply>
#include <QDBusMessage>
int main()
{
QDBusInterface player(QString("org.mpris.%1").arg("amarok"), "/TrackList", "org.freedesktop.MediaPlayer");
QDBusReply<int> length = player.call("GetLength");
cout << length;
return length;
}
(probably wont compile but might give me usefull error messages, but instead i get errors regarding the includes
SongsInPlaylist.cpp:1:26: error: QDBusInterface: No such file or directory
SongsInPlaylist.cpp:2:25: error: QDBusMetaType: No such file or directory
SongsInPlaylist.cpp:3:22: error: QDBusReply: No such file or directory
SongsInPlaylist.cpp:4:24: error: QDBusMessage: No such file or directory
I know the files are in /usr/include/qt4/QtDBus/, but don't know how to include them (adding full path just leads to other errors such as
In file included from /usr/include/qt4/QtDBus/QDBusInterface:1,
from SongsInPlaylist.cpp:1:
/usr/include/qt4/QtDBus/qdbusinterface.h:45:43: error: QtDBus/qdbusabstractinterface.h: No such file or directory ))
#include <QDBusInterface>
#include <QDBusMetaType>
#include <QDBusReply>
#include <QDBusMessage>
int main()
{
QDBusInterface player(QString("org.mpris.%1").arg("amarok"), "/TrackList", "org.freedesktop.MediaPlayer");
QDBusReply<int> length = player.call("GetLength");
cout << length;
return length;
}
(probably wont compile but might give me usefull error messages, but instead i get errors regarding the includes
SongsInPlaylist.cpp:1:26: error: QDBusInterface: No such file or directory
SongsInPlaylist.cpp:2:25: error: QDBusMetaType: No such file or directory
SongsInPlaylist.cpp:3:22: error: QDBusReply: No such file or directory
SongsInPlaylist.cpp:4:24: error: QDBusMessage: No such file or directory
I know the files are in /usr/include/qt4/QtDBus/, but don't know how to include them (adding full path just leads to other errors such as
In file included from /usr/include/qt4/QtDBus/QDBusInterface:1,
from SongsInPlaylist.cpp:1:
/usr/include/qt4/QtDBus/qdbusinterface.h:45:43: error: QtDBus/qdbusabstractinterface.h: No such file or directory ))