From e8a7bf16a5de5a68d4a9f2f0fdb1f115f78c3ec7 Mon Sep 17 00:00:00 2001 From: Lalit Date: Mon, 13 Dec 2021 21:45:02 -0800 Subject: [PATCH 1/3] add note on DLLs support --- INSTALL.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 65cb66a28d..b12f40c956 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -66,7 +66,9 @@ build systems for opentelemetry-cpp. configuration, the code is compiled without `-fpic` option, so it is not suitable for inclusion in shared libraries. To enable the code for inclusion in shared libraries, this variable is used. - + - `-D-DBUILD_SHARED_LIBS=ON` : To build shared libraries for the targets. Please + refer to note [below](#building-shared-libs-for-windows) for Windows DLL + support - `-DWITH_OTLP=ON` : To enable building Otlp exporter. - `-DWITH_PROMETHEUS=ON` : To enable building prometheus exporter. @@ -237,6 +239,12 @@ cc_library( ) ``` +## Building shared libs for Windows + +Windows DLL build is not supported. There are some constraints on how C++ DLLs work on +Windows, specifically we can't safely allocate memory in one DLL and free it in another. +For now, OpenTelemetry C++ targets need to be statically linked with the Windows Application. + ## Using Package Managers If you are using [Conan](https://www.conan.io/) to manage your dependencies, From 857e7d9136502acf1bc9b8551415e7938edafce2 Mon Sep 17 00:00:00 2001 From: Lalit Date: Mon, 13 Dec 2021 21:47:05 -0800 Subject: [PATCH 2/3] spell --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index b12f40c956..11f85ed554 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -66,7 +66,7 @@ build systems for opentelemetry-cpp. configuration, the code is compiled without `-fpic` option, so it is not suitable for inclusion in shared libraries. To enable the code for inclusion in shared libraries, this variable is used. - - `-D-DBUILD_SHARED_LIBS=ON` : To build shared libraries for the targets. Please + - `-DBUILD_SHARED_LIBS=ON` : To build shared libraries for the targets. Please refer to note [below](#building-shared-libs-for-windows) for Windows DLL support - `-DWITH_OTLP=ON` : To enable building Otlp exporter. From aa82f5447318fc32a6e380e5f2575323fdf28d35 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 13 Dec 2021 21:50:56 -0800 Subject: [PATCH 3/3] Update INSTALL.md Co-authored-by: Tom Tan --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 3c2c4ded55..d588497a2d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -247,7 +247,7 @@ cc_library( Windows DLL build is not supported. There are some constraints on how C++ DLLs work on Windows, specifically we can't safely allocate memory in one DLL and free it in another. -For now, OpenTelemetry C++ targets need to be statically linked with the Windows Application. +For now, OpenTelemetry C++ targets need to be statically linked into the Windows applications. ## Using Package Managers