Using glib in Qt meet problem.
-
I have compiled the http://gupnp.org/ source code, gupnp, gupnp-av successfully without using Qt
Then I port gupnp-tools to QT, and it will link gupnp and gupnp-av, but meet a problem.The gupnp is based on GObject, and It will use the GDBusInterfaceInfo class which is declared as below:
struct _GDBusInterfaceInfo
{
...
GDBusSignalInfo **signals;
...
}
Here is the conflict with Qt signals, thus compile failed.any ideas?
-
maybe wrapping gupnp class/structs/objects definitions into separate namespace will make a trick?!
-
I have compiled the http://gupnp.org/ source code, gupnp, gupnp-av successfully without using Qt
Then I port gupnp-tools to QT, and it will link gupnp and gupnp-av, but meet a problem.The gupnp is based on GObject, and It will use the GDBusInterfaceInfo class which is declared as below:
struct _GDBusInterfaceInfo
{
...
GDBusSignalInfo **signals;
...
}
Here is the conflict with Qt signals, thus compile failed.any ideas?
Hi @xhsoldier , could you share your port of gupnp-tools to QT please?
-
I have found better and more convenient solution.
You should do only one thing - include your glib headers before Qt headers - so it's unaffected by Qt defines.
Using this approach, you don't need to change macro names and anything else.