Skip to content

Commit

Permalink
Add note on DLL support (#1137)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Dec 14, 2021
1 parent f349053 commit 7f5eb45
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7f5eb45

Please sign in to comment.