Error between winsock2.h and ws2def.h
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- networking
Research direction
Start with HttpRequest.cpp and reproduce its Windows compilation with the reported Windows Kits headers. Trace which include brings in winsock.h before ws2def.h, then confirm the 161 duplicate-definition errors are gone while the header still compiles successfully.
Written by the indexing model from the issue text.
Description
I simply include "HttpRequest.cpp" and at compile time I have 161 errors of this type :
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winsock.h(457): message : voir la définition précédente de 'AF_IPX'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(147,1): warning C4005: 'AF_MAX' : redéfinition de macro
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winsock.h(476): message : voir la définition précédente de 'AF_MAX'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(185,1): warning C4005: 'SO_DONTLINGER' : redéfinition de macro
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winsock.h(399): message : voir la définition précédente de 'SO_DONTLINGER'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(238,25): error C2011: 'sockaddr' : redéfinition du type 'struct'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winsock.h(1007): message : voir la déclaration de 'sockaddr'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(440,5): error C2143: erreur de syntaxe : absence de '}' avant 'constante'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(440,27): error C2059: erreur de syntaxe : 'constante'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h(494,1): error C2143: erreur de syntaxe : absence de ';' avant '}'```
I tried a lot of solutions like including windows.h before httprequest.cpp but nothing works
- Dominant language
- C++
- Stars
- 971
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elnormous/HTTPRequest
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
elnormous/HTTPRequest#79 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elnormous/HTTPRequest#77 ·
-
A couple of ideasOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
elnormous/HTTPRequest#76 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
elnormous/HTTPRequest#75 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
elnormous/HTTPRequest#74 · 1 comment ·
All issues in elnormous/HTTPRequest
Similar issues
-
bug chart-audit
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
HasBacktrace Priority-Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
azerothcore/azerothcore-wotlk#27921 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
yhirose/cpp-peglib#344 ·