Skip to content

Commit 1cf8ac5

Browse files
authored
Apply suggestions from code review
Signed-off-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 2e56844 commit 1cf8ac5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/setup/setting_up_osi_cpp.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ Basically, this can be set in CMake, e.g. https://cmake.org/cmake/help/latest/pr
8383
Therefore, it could make sense to still dynamically link against the C Runtime when statically linking _protobuf_ / OSI.
8484
(This is important e.g. when building shared libraries, since a static C runtime will create an isolated heap for your dll, which can lead to segfaults depending on what you expose on your public interfaces.)
8585

86-
The easiest way to achieve static linking on Windows without setting all the stuff manually in Cmake and building _protobuf_ is to actually **install static _protobuf_ with dynamic c-runtime with vcpkg**:
86+
The easiest way to achieve static linking on Windows without setting all the stuff manually in Cmake and building _protobuf_ is to actually **install static _protobuf_ with dynamic c-runtime with vcpkg**.
87+
This will happen automatically if you use vcpkg with the CMake preset `vcpkg-windows`.
88+
If you want to installl the dependencies manually using vcpkg, then follow these instructions:
8789

8890
Install vcpkg as per the vcpkg documentation.
8991
Create a new triplet file for the required combination of static library linking with dynamic runtime (usually needed for dynamic linking to still work):
@@ -95,7 +97,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
9597
set(VCPKG_LIBRARY_LINKAGE static)
9698
----
9799

98-
Now the protobuf libraries can be built automatically using:
100+
After installing vcpkg as per the vcpkg documentation the protobuf libraries can be built using:
99101
----
100102
vcpkg install --triplet=x64-windows-static-md protobuf
101103
----

0 commit comments

Comments
 (0)