You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: 26.x
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows What runtime / compiler are you using (e.g., python version or gcc version)
msvc 2022 What did you do?
Then link against some static library, you will get errors like this:
libcpmtd.lib(xstol.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in cmake_pch.cxx.obj
It is fixed by passing -Dprotobuf_MSVC_STATIC_RUNTIME=OFF to the cmake configure args.
Is there any reason why protobuf_MSVC_STATIC_RUNTIME is not OFF by default when protobuf_BUILD_SHARED_LIBS=OFF ?
For package management, it would be great.
The text was updated successfully, but these errors were encountered:
What version of protobuf and what language are you using?
Version: 26.x
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows
What runtime / compiler are you using (e.g., python version or gcc version)
msvc 2022
What did you do?
Buid protobuf as a static library.
Then link against some static library, you will get errors like this:
It is fixed by passing
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF
to the cmake configure args.Is there any reason why
protobuf_MSVC_STATIC_RUNTIME
is notOFF
by default whenprotobuf_BUILD_SHARED_LIBS=OFF
?For package management, it would be great.
The text was updated successfully, but these errors were encountered: