Skip to content

DELETE macro conflict #32

Open
Open

Description

@robozman

I'm having an issue when compiling a program that uses qhttpengine on Windows.
The use of DELETE at

is resolving the DELETE macro that in defined in winnt.h. This is causing the compile to fail with a syntax error.

My current workaround for this is to rename the DELETE in socket.h to something else but this obviously isn't a good solution to the problem.

Thanks for your help and for your software!

Activity

  1. nathan-osman commented on Aug 14, 2019

    @nathan-osman
    Member

    One possible option (assuming you don't need the DELETE constant from winnt.h) is to add the following line before including socket.h:

    #undef DELETE
    #include <qhttpengine/socket.h>

    As for a long term solution, let me give this some careful thought.

    (This is one of the reasons I don't like #defines - it pollutes the global namespace and causes problems like this.)

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions