Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note on DLL support #1137

Merged
merged 4 commits into from
Dec 14, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 with the Windows Application.
lalitb marked this conversation as resolved.
Show resolved Hide resolved

## Using Package Managers

If you are using [Conan](https://www.conan.io/) to manage your dependencies,
Expand Down