Skip to content

Commit

Permalink
Export the constants in protobuf's any.h to support DLL builds.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Aug 22, 2023
1 parent f41210c commit fd24b1b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/google/protobuf/any.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fd24b1b

Please sign in to comment.