[wx 2.6.3, WinXP, VC7.1] winsock vs winsock2.
Armel Asselin
armelasselin at hotmail.com
Sat Aug 5 01:12:00 PDT 2006
"Vadim Zeitlin" <vadim at wxwindows.org> a écrit dans le message de news:
E1G977n-0005xH-00 at smtp.tt-solutions.com...
> On Fri, 4 Aug 2006 15:12:14 -0400 "Broer, Dirk" <Dirk.Broer at symbol.com>
> wrote:
>
> BD> Now, I can force ACE to use winsock (massive recompile etc.) or I
> think
> BD> I would like to force wxWidgets to using winsock2.
>
> This shouldn't be difficult but it's not supported out of the box.
> Basically, what you need to do is to extract all inclusions of winsock.h
> (just 4 of them in fact) in some wx/msw/wrapwsck.h which then would
> include
> either winsock.h or winsock2.h depending on some wxUSE_WINSOCK2 setting.
> If you decide to do this, please consider submitting a patch as this would
> (a) ensure that this code is maintained and (b) could be useful to other
> people.
windows.h includes by itself winsock.h at various places if I remember well.
the official way is to include winsock2.h by yourself at the top of your
inclusions (generally the top of the precompiled header .h, for sure it
could be with a wxUSE_WINSOCK2).
failing to put the winsock2 include at the top will finish with "#error
winsock already included".
HIH
Armel
More information about the wx-users
mailing list