Qt5 and WinSock.h issue

  • Hi

    This is regarding Windows platform - MSVC2010. In my Qt4.8.1 based application I was including BOOST/ASIO headers after including all Qt headers. When I tried to compile in Qt5.0.1 I got error: ..\asio\asio\detail\socket_types.hpp:22: error: C1189: #error : WinSock.h has already been included.

    The problem is with #include <QtNetwork> being included before ASIO. What changed in QtNetwork regarding WinSock.h?

    Thank you.

  • Hi,

    I am getting the same error. Please update if you find any solutions regarding this.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.