Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
177 stars 126 forks source link

azure-core-opentelemetry-cpp to support being built as Win32 DLL #5683

Open antkmsft opened 6 months ago

antkmsft commented 6 months ago

The only reason that it can't be built as Win32 DLL is that one of its dependencies, the MS OpenTelemetry library, only supports being built as Static Lib on Win32.

But technically, it might be possible to produce Win32 DLL, while having Static Lib dependencies. Not exactly, but kind of how we do with the vendored uamqp-c library.

We may ask vcpkg team, what manifest magic do we need to use in order to have this enabled.

Or, ask MS OTel to enable building for x64-windows triplet.

LarryOsterman commented 6 months ago

One quick correction: The OpenTelemetry SDK is not a Microsoft SDK, it's owned by the Cloud Native Computing Foundation.

When I asked the OpenTelemetry team about delivering a DLL on Windows back in 2021, their answer was that Windows doesn't support C++ DLLs, only C DLLs. This is tied to the "C++ doesn't have a stable binary contract" problem. I don't know if their opinion has changed however.