wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.81k stars 1.71k forks source link

Compile msw/utils.cpp for new APIs vers. #5425

Closed wxtrac closed 2 years ago

wxtrac commented 22 years ago

Issue migrated from trac ticket # 5425

component: wxMSW | priority: normal

2002-06-07 06:56:17: grafik created the issue


Slight changes to compile msw/utils.cpp when specifically targetting new API version, that is WINVER >= 4.0.

THe problem was that including winsock.h directly causes multiple defenitions because of an inclusion bug in windows.h/winsock.h/winsock2.h. When setting WINVER, etc. to > 0x400 winsock can only be included by windows.h, and doesn't seem to work any other way.

wxtrac commented 22 years ago

2002-06-07 17:08:47: grafik uploaded file src-msw-utils.cpp.patch (0.8 KiB)

wxtrac commented 22 years ago

2002-06-07 23:00:27: @vadz commented


We indeed shouldn't include winsock.h directly, I'm unsure about why has this been done but I've just removed this as it should be included by the line just below (including windows.h via wx/msw/private.h) anyhow.