Export the constants in protobuf's any.h to support DLL builds.

The issue is that if another component (MediaPipe in this case) calls PackFrom, there'll be linker errors because kTypeGoogleApisComPrefix wasn't found.

PiperOrigin-RevId: 559132962
pull/13280/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent f41210c683
commit fd24b1bef4
  1. 9
      src/google/protobuf/any.h

@ -48,9 +48,12 @@ class Message;
namespace internal {
extern const char kAnyFullTypeName[]; // "google.protobuf.Any".
extern const char kTypeGoogleApisComPrefix[]; // "type.googleapis.com/".
extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/".
// "google.protobuf.Any".
PROTOBUF_EXPORT extern const char kAnyFullTypeName[];
// "type.googleapis.com/".
PROTOBUF_EXPORT extern const char kTypeGoogleApisComPrefix[];
// "type.googleprod.com/".
PROTOBUF_EXPORT extern const char kTypeGoogleProdComPrefix[];
std::string GetTypeUrl(absl::string_view message_name,
absl::string_view type_url_prefix);

Loading…
Cancel
Save