Skip to content

Conversation

@keeruline
Copy link
Contributor

include <bandit/bandit.h> before the winsock2 generates large amount of redefinition errors originating from conflicts between winsock.h and winsock2.h. Root cause is winsock.h included from the windows.h

#include <bandit/bandit.h> before the winsock2 generates large amount of redefinition errors originating from conflicts between winsock.h and winsock2.h. Root cause is winsock.h included from the windows.h
@joakimkarlsson
Copy link
Collaborator

Thanks!

Not having worked with the windows headers in ages: Are these macros the preferred way of minimizing dependencies? Or would it be better to include only those headers actually needed for color output instead of windows.h?

@keeruline
Copy link
Contributor Author

GetStdHandle will require winbase.h which can't be included alone. There many child header files referenced by windows.h many of them are not self contained.

joakimkarlsson added a commit that referenced this pull request Oct 14, 2013
minimize dependencies from windows.h
@joakimkarlsson joakimkarlsson merged commit 53f674d into banditcpp:master Oct 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants