Skip to content

Compilation error when compiling with MinWG (incl. solution) #96

Description

@FL140

When I use the header file for a project that cross compiles on Ubuntu 2025.10 for Windows (WIN32) I run into the following compiler error:

.../deps/mdns/mdns.h:24:10: fatal error: Winsock2.h: No such file or directory
   24 | #include <Winsock2.h>
      |          ^~~~~~~~~~~~
compilation terminated.

Since Linux is using a case sensitive filesystem the solution is simply to replace:

#ifdef _WIN32
#include <Winsock2.h>
#include <Ws2tcpip.h>

with

#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>

Please note that ws2tcpip.h also needs to be fixed.
Can someone please fix this in main and add a new tag like v1.4.4? That would be great! THX!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions