diff --git a/INSTALL.md b/INSTALL.md index 308c847b40..d588497a2d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -70,7 +70,9 @@ You can link OpenTelemetry C++ SDK with libraries provided in [dependencies.md]( 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. - + - `-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. @@ -241,6 +243,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 into the Windows applications. + ## Using Package Managers If you are using [Conan](https://www.conan.io/) to manage your dependencies,