The Wayback Machine - https://web.archive.org/web/20201201005300/https://github.com/microsoft/cpprestsdk/pull/26
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

Static lib compilation for UWP #26

Closed
wants to merge 2 commits into from

Conversation

@simonferquel
Copy link

@simonferquel simonferquel commented Nov 27, 2015

This is a very small addition with only a vcxproj for doing static lib compilation of Casablanca for UWP platform.
This produces safe to ignore warnings about static lib compilation with /ZW flag (it is safe because Casablanca does not expose public winrt types).

The motivation was to mix the benefits of using the native Windows http client (with its support for caching, prefetch and more), and the completeness of Casablanca Json serialization/deserialization (WinRT Json is somewhat basic, especially for long numbers handling), without paying for the whole Casablanca dll (saving bandwidth and memory consumption - especially in background agents).

@msftclas
Copy link

@msftclas msftclas commented Nov 27, 2015

Hi @simonferquel, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas
Copy link

@msftclas msftclas commented Nov 27, 2015

@simonferquel, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@msftclas msftclas added cla-signed and removed cla-required labels Nov 27, 2015
<DebugFileSuffix>d</DebugFileSuffix>
</PropertyGroup>
<PropertyGroup>
<TargetName>$(CppRestBaseFileName)140$(DebugFileSuffix)_uwp_$(CppRestSDKVersionFileSuffix)</TargetName>

This comment has been minimized.

@kavyako

kavyako Nov 30, 2015
Contributor

The import lib for the shared library cpprest140d_uwp_2_7.dll already has this name. I would prefer using different names here to minimize chances of mistaking the library type (import/static).
How about following a specific naming convention for static libs, say add _static suffix (cpprest140d_uwp_static_2_7.lib) or prepend the name with lib (libcpprest140d_uwp_2_7.lib).

This comment has been minimized.

@kavyako

kavyako Dec 1, 2015
Contributor

Some one suggested we can look at doing something similar to boost, http://www.boost.org/doc/libs/1_42_0/more/getting_started/windows.html#library-naming

If you are building a static library, use the lib prefix.
If the library is linking statically to the C++ standard library and compiler runtime support libraries, use s in the .lib name.
In this case, we are not linking statically to the runtime. so we can go with libcpprest140d_uwp_2_7.lib.
In future, if someone wants to add another version to link to the runtime statically, we can add _s to the name.
What do you think.

@kavyako
Copy link
Contributor

@kavyako kavyako commented Dec 2, 2015

This change got merged to the development branch while I was merging something else. I will not revert it. Once we decide on the name, I can update the proj file with it.

@kavyako
Copy link
Contributor

@kavyako kavyako commented Dec 7, 2015

I have modified the static lib name to libcpprest140d_uwp_2_7.lib. The change is in the development branch. Please reopen the thread if you disagree with the naming convention.

Thank you for contributing the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.