can not compile dbus 1.6.2 on Win 7 64 bits

Earnie Boyd earnie at users.sourceforge.net
Tue Jul 17 09:32:26 PDT 2012


On Tue, Jul 17, 2012 at 10:32 AM, Vincent Torri wrote:
> Hey
>
> I have installed MSYS, mingw-w64 64 bits 4.7.0.
> I have compiled and installed expat 2.1.0 myself in /usr/local
> I have configure dbus with just ./configure
> Then make :
>
> ....
>
>   CCLD   dbus-daemon.exe
> c:/mingw/mingw-w64-x86_32/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> cannot find -lrt
> collect2.exe: error: ld returned 1 exit status
>
> so -lrt is passed somewhere while it does not exist on Windows.
>
> If you want more informations, please tell me.
>
> Note : some warnings:
>
> 1)
>
> In file included from dbus-sockets-win.h:36:0,
>                  from dbus-sysdeps-win.c:49:
> c:\mingw\mingw-w64-x86_32\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/include/winsock2.h:15:2
> : warning: #warning Please include winsock2.h before windows.h [-Wcpp]
>

More stupidity from Microsoft.  You can also define
WINDOWS_LEAN_AND_MEAN to avoid the conflict.  The conflict itself is
that winsock.h (version 1) is included by default when windows.h is
included without declaring WINDOWS_LEAN_AND_MEAN which interferes with
winsock2.h.

> that's something to fix. You can find some arguments why it must be
> fixed in the mingw-w64 ML, iirc.
>

The winsock2.h header checks to see that _WINSOCKAPI_ isn't defined
which indicates that winsock.h has been included.  IMO, the message
isn't appropriate for the sin since one could also include winsock.h
alone.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the dbus mailing list