Building QtDBus

Stromek stromek at realtime.sk
Tue Oct 24 09:20:13 CEST 2006


On Tue, Oct 24, 2006 at 12:00:23AM +0200, Peter Kümmel wrote:
> Stromek wrote:
> > On Sun, Oct 22, 2006 at 10:02:30PM +0200, Christian Ehrlicher wrote:
> >>> Looking at
> >>> http://www.kdelibs.com/wiki/index.php/QtDBus
> >>> I can see that http://sourceforge.net/projects/windbus points to binary 
> >>> windbus distribution. So are the steps "apply windows-patch.diff and compile 
> >>> D-Bus" still needed?
> >>>
> >> Now I know why we get an _RTC_CheckEsp linker error... Peter, Am I right
> >> that this snapshot is build with msvc?
> > 
> > I've built both qt and windbus with msvc and this time it succeeded without _RTC_CheckEsp
> > linking errors. I was following the procedure from kdelibs which was refreshed yesterday (imho it is much more clearer than the procedure before). I've also updated src.pro (posted to this list) which requires update to wiki (I do not have permissions to do it myself).
> > 
> > Btw. in windbus, I have to call _vsnprint instead of vsnprint.
> 
> it doesn't compile out of the box? Have you used a svn checkout?

I checked out windbus r360. During compilation it failed in
dbus-sysdeps-win.c:

/**
 * Measure the message length without terminating nul 
 */
int _dbus_printf_string_upper_bound (const char *format,
                                     va_list args)
{
  /* MSVCRT's vsnprintf semantics are a bit different */
  /* The C library source in the Platform SDK indicates that this
   * would work, but alas, it doesn't. At least not on Windows
   * 2000. Presumably those sources correspond to the C library on
   * some newer or even future Windows version.
   *
    len = _vsnprintf (NULL, _DBUS_INT_MAX, format, args);
   */
  char p[1024];
  int len;
  len = _vsnprintf (p, sizeof(p)-1, format, args);
  if (len == -1) // try again
    {
      char *p;
      p = malloc (strlen(format)*3);
      len = _vsnprintf (p, sizeof(p)-1, format, args);
      free(p);
    }
  return len;
}

I had to prepend underscore to vsnprintf as in the code above. (I've
used WinXP and MSVC.NET).

-- 
Stromek



More information about the Kde-windows mailing list