Replies: 1 comment
-
Ran into the same issue, the following include order and macros fixed it for me: // ...prior includes
//
// Abseil
//
#include <absl/cleanup/cleanup.h>
#include <absl/strings/match.h>
//
// OpenTelemetry
//
#define HAVE_ABSEIL // fixes redefinitions of absl types
#include <opentelemetry/exporters/otlp/otlp_http_exporter_factory.h>
#include <opentelemetry/exporters/otlp/otlp_http_exporter_options.h>
#include <opentelemetry/sdk/trace/processor.h>
#include <opentelemetry/sdk/trace/simple_processor_factory.h>
#include <opentelemetry/sdk/trace/tracer_provider_factory.h>
#include <opentelemetry/trace/provider.h>
namespace trace = opentelemetry::trace;
namespace nostd = opentelemetry::nostd;
namespace trace_sdk = opentelemetry::sdk::trace;
namespace otlp = opentelemetry::exporter::otlp;
// ...possibly more includes
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on a C++ project that uses both the absl and opentelemetry libraries. I've noticed that there's a naming conflict between these two libraries, specifically with the internal namespace. Both libraries have an internal namespace, and the compiler can't determine which one to use.
Here's the error message I'm getting:
error C2872: 'internal': ambiguous symbol
and many other ambiguous symbol. How do i disable incluiding the abseil-cpp header files from opentelemetry while installing it. I tried withWITH_ABSEIL
turned off but that includes the absl header file.Beta Was this translation helpful? Give feedback.
All reactions