Skip to content

EXPORT definition might collide easily #19

Open

Description

@hayguen
#define EXPORT __declspec(dllexport)

is defined in Host.h include from other public headers (SimpleSocket.h), with guard #ifdef _MSC_VER.
however this definition might collide easily with user code using CLsocket.

i'd suggest to rename EXPORT into CLSOCKET_EXPORT ..
[ and possibly make this definition only when having an additional private definition in CMakeLists.txt, e.g. when compiling the shared library ]

Activity

  1. lethosor commented on Aug 12, 2020

    @lethosor
    Member

    Sounds good to me - probably something I should have thought about in #17

  2. hayguen commented on Aug 12, 2020

    @hayguen
    ContributorAuthor

    now have also a commit for this issue in PR #4
    might need some more testing on Windows - but it got late for today.

    different from my own suggestion i renamed EXPORT to CLSOCKET_API,
    and also added dllimport .. and activate that only when compiling the shared library.

  3. lethosor commented on Sep 9, 2020

    @lethosor
    Member

    Looks awesome, thanks for the fix! Saves me from having to address #17 (comment). That was on my to-do list, so I'll take a closer look at #4, hopefully soon.

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