Win32 Port of D-Bus
Thiago Macieira
thiago.macieira at trolltech.com
Tue Apr 25 00:08:17 PDT 2006
Havoc Pennington wrote:
>Kosina, Martin wrote:
>> Unless someone knows of a more clever way, the
>> library headers will also need to contain a macro in front of function
>> declarations and typedefs, something like:
>>
>> DBUS_API typedef struct DBusTimeout DBusTimeout;
>> DBUS_API DBusConnection* dbus_connection_open (const char *address,
>> DBusError *error);
>
>I believe it's possible to use a separate symbols file? (doesn't gtk do
> so?)
This isn't just for the benefit of libdbus, it's also for the benefit of
user applications.
When using a function from a DLL on Windows, the normal way is that the
function is declared __declspec(dllimport). The user code won't need any
special modification to compile and link.
If we drop that and instead go with an exports file, it makes our lives
easier, but not that of our users: since our .h won't mark what is to be
imported, they need special compiler and/or linker options to let the
compiler/linker know that some of the functions are to be imported. I
know g++ on Windows (cygwin and mingw) have those options (ld actually),
but I am not familiar with the Microsoft compiler suite.
To Martin: I understand DBUS_API for external variables and functions, but
for typedefs?
>> 4. no way to disable verbose mode (no vararg macros in MSVC 6/7). VC8
>> (2005) is supposed to have this, haven't tried it yet.
I can check with our developers if they know of this.
>Can you use a no-op inline function instead of a macro maybe?
This still means the parameters are evaluated. The optimiser will clean
most of that out, but not function calls.
--
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060425/83931074/attachment.pgp
More information about the dbus
mailing list