Skip to content

[BUG] "winsock2.h" not found error on mingw64 #280

Open
@computergeek1507

Description

@computergeek1507

Prerequisites

Description

I am attempting to compile libhttpserver on Windows 10 using msys2 with mingw64.

Steps to Reproduce

  1. pacman -S mingw-w64-x86_64-libmicrohttpd
  2. git clone https://github.com/etr/libhttpserver.git
  3. cd libhttpserver
  4. mkdir build
  5. cd build
  6. ../configure
  7. or ../configure --disable-fastopen --prefix /mingw64 CXXFLAGS=-I/mingw64/include LDFLAGS=-L/mingw64/lib

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]
If I run "../configure" by itself I get an configuration error for "winsock2.h" not found

also tried

"../configure --disable-fastopen --prefix /mingw64 CXXFLAGS=-I/mingw64/include LDFLAGS=-L/mingw64/lib"
"../configure --disable-fastopen --prefix=/D/msys64/mingw64 CXXFLAGS=-I/D/msys64/mingw64/include LDFLAGS=-L/D/msys64/mingw64/lib"

I get an configuration error for "error.h" not found

Reproduces how often: 100%

Versions

  • OS version Windows 10 Pro 21H2
  • libhttpserver version: github master
  • libmicrohttpd version : mingw-w64-x86_64-libmicrohttpd 0.9.75-2

If you have problems during build:

  • Compiler version
  • autotools version

Additional Information

Any additional information, configuration (especially build configuration flags if you compiled the libraries) or data that might be necessary to reproduce the issue.

If you have problems during build, please attach your config.log and the full scope of your error from make.

If you have problems at execution, please:

  • attach the stacktrace in case of crash (a coredump would be even better).
  • provide a main that reproduces the error.
    image
    image

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions