Skip to content

Commit fd24b1b

Browse files
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
1 parent f41210c commit fd24b1b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/google/protobuf/any.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ class Message;
4848

4949
namespace internal {
5050

51-
extern const char kAnyFullTypeName[]; // "google.protobuf.Any".
52-
extern const char kTypeGoogleApisComPrefix[]; // "type.googleapis.com/".
53-
extern const char kTypeGoogleProdComPrefix[]; // "type.googleprod.com/".
51+
// "google.protobuf.Any".
52+
PROTOBUF_EXPORT extern const char kAnyFullTypeName[];
53+
// "type.googleapis.com/".
54+
PROTOBUF_EXPORT extern const char kTypeGoogleApisComPrefix[];
55+
// "type.googleprod.com/".
56+
PROTOBUF_EXPORT extern const char kTypeGoogleProdComPrefix[];
5457

5558
std::string GetTypeUrl(absl::string_view message_name,
5659
absl::string_view type_url_prefix);

0 commit comments

Comments
 (0)