VS2015 (3.0.0. beta 1) link options changed to MT for static libs - breaks apps
In alpha series using the vsprojects solution, building protobuf as a static lib linked it with the dynamic C runtime (/MD)
In the beta (generated via cmake) with the 64 bit VS generator, there is explicit code in the cmakelists for a static lib that changes this behaviour to use a static C runtime (/MD -> /MT)
Question is - why the change in behaviour by default (all my apps now don't link to libprotobuf.lib!). It makes using the protobuf lib as a reusable component very difficult.
There are obviously benefits to either approach, but so long as I manage the versioning of the dynamic runtime for my app (needed for an MD approach) it seems the better, more flexible choice.
Perhaps consider adding another CMAKE parameter to conditionally switch between MD and MT e.g. BUILD_WITH_DYNAMIC_RUNTIME which is ignored when building a shared lib version?
The MT approach leaves me with multiple C runtimes NOT sharing heaps and couples my various app static lib components to require exactly the same C runtime version at build time (of the components). I want to resolve the C lib versioning when building/deploying each app, NOT when creating the components many months before (when an earlier runtime may have been available).
I believe this is related to https://github.com/google/protobuf/pull/702
You can use protobuf_MSVC_STATIC_RUNTIME to control this behavior now.