undefined reference to `dbustl::types::Deserializer<signed char>::run(DBusMessageIter*, signed char*)'

11 views
Skip to first unread message

Giampiero Gabbiani

unread,
May 20, 2012, 5:27:14 AM5/20/12
to dbustl-users
Hi,
I'm using your - very interesting - dbustl library, because of it's
close to the c++ stl standards in comparison with others.

Whenever I tried to compile the following test:

#include <dbustl-1/dbustl>

#include <vector>
#include <string>
#include <iostream>

using namespace std;
using namespace dbustl;

struct variant {
string name;
int8_t value;
};

DBUSTL_REGISTER_STRUCT_2(
variant,
name,
value
)

int main() {
ObjectProxy remoteObject(Connection::sessionBus(), "/org/
freedesktop/Notifications", "org.kde.plasma-desktop");
try {
uint32_t reply;
remoteObject.setInterface("org.freedesktop.Notifications");
list<string> actions;
variant hints={"urgency",0};
remoteObject.call("Notify", "application name",
(uint32_t)0,"","summary","body",actions,hints,(int32_t)0,&reply);
/* reply now contains a valid string */
cout << reply << endl;
}
catch(const DBusException& e) {
/* Dbus call failed: e.name() constains error cause */
cerr << e.what() << endl;
}
return 0;
}

I got an error during the bind of the program:

/usr/local/include/dbustl-1/types/Struct:254: undefined reference to
`dbustl::types::Deserializer<signed char>::run(DBusMessageIter*,
signed char*)'

even if the program is linked to dbus-1 dbustl-1 dbustl-glib-1.

Am I missing something?

Thanks in advance
Giampiero

Giampiero Gabbiani

unread,
May 27, 2012, 4:37:27 AM5/27/12
to dbustl-users
Hi,
solved, I just implemented the 'dbustl::types::Deserializer<signed
char>::run(DBusMessageIter*,
> signed char*)'

Many thanks
Giampiero

Fabien Chevalier

unread,
May 27, 2012, 2:00:47 PM5/27/12
to dbustl...@googlegroups.com
Hi, to be completely honest i don't remember why int8_t was not deseralizable, however i think there was a good reason.

Regards,

Fabien
Reply all
Reply to author
Forward
0 new messages