Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPORT definition might collide easily #19

Open
hayguen opened this issue Aug 12, 2020 · 3 comments
Open

EXPORT definition might collide easily #19

hayguen opened this issue Aug 12, 2020 · 3 comments

Comments

@hayguen
Copy link
Contributor

hayguen commented Aug 12, 2020

#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 ]

@lethosor
Copy link
Member

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

@hayguen
Copy link
Contributor Author

hayguen commented Aug 12, 2020

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.

@lethosor
Copy link
Member

lethosor commented Sep 9, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants