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

[cpprestsdk] Fix usage issue when building static #12006

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

JackBoosY
Copy link
Contributor

According to the header file, the macro _NO_ASYNCRTIMP should be defined on static build:

#ifdef _NO_ASYNCRTIMP
#define _ASYNCRTIMP
#else // ^^^ _NO_ASYNCRTIMP ^^^ // vvv !_NO_ASYNCRTIMP vvv
#ifdef _ASYNCRT_EXPORT
#define _ASYNCRTIMP __declspec(dllexport)
#else // ^^^ _ASYNCRT_EXPORT ^^^ // vvv !_ASYNCRT_EXPORT vvv
#define _ASYNCRTIMP __declspec(dllimport)
#endif // _ASYNCRT_EXPORT
#endif // _NO_ASYNCRTIMP

Fixes #996.

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Jun 18, 2020
@JackBoosY JackBoosY marked this pull request as ready for review June 18, 2020 09:30
@JackBoosY JackBoosY requested a review from LilyWangL June 18, 2020 09:31
@LilyWangL LilyWangL added the info:reviewed Pull Request changes follow basic guidelines label Jun 18, 2020
@vicroms vicroms merged commit 0889632 into microsoft:master Jun 23, 2020
@JackBoosY JackBoosY deleted the dev/jack/996 branch June 24, 2020 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot static link to cpprestsdk 2.9
3 participants