meltwater / served

A C++11 RESTful web server library
MIT License
710 stars 174 forks source link

Fix two name clashes with Windows includes #56

Closed plule-ansys closed 5 years ago

plule-ansys commented 5 years ago

ERROR is a macro in wingdi.h. It can be avoided by defining NOGDI at build level. DELETE is a macro in winnt.h. It has to be undefined.

Unfortunately I don't see a better fix except renaming the enum members.

Jeffail commented 5 years ago

Looks good, thanks @plule-ansys!

jputcu commented 4 years ago

I've tried the current master version on Windows under Mingw64, but get many of these ERROR and DELETE conflicts.

plule-ansys commented 4 years ago

@jputcu Hello, using bazel the build seems to be still OK on Windows. If you are using CMake, I think you have to manually define NOGDI and possibly _MSC_VER in the CMakeList.txt.