如何解决C++编译protobuf时LNK2001无法解析外部符号的问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计328个文字,预计阅读时间需要2分钟。
在配置完成后编译protobuf时,若遇到如下提示:
LNK2001 无法解析的外部符号 union google::protobuf::internal::EmptyString google::protobuf::internal::fixed_address_empty_string (@internal@proto)
请检查代码中是否有以下代码段:
cppunion google::protobuf::internal::EmptyString;
如果存在,请确保该代码段在protobuf的头文件中正确引用,或者将其移除。
在所在配置完成后编译protobuf时还是提示如下
LNK2001无法解析的外部符号 "union google::protobuf::internal::EmptyString google::protobuf::internal::fixed_address_empty_string" (?fixed_address_empty_string@internal@protobuf@google@@3TEmptyString@123@A)
真坑啊,各种操作猛如虎后结果还是不行。
本文共计328个文字,预计阅读时间需要2分钟。
在配置完成后编译protobuf时,若遇到如下提示:
LNK2001 无法解析的外部符号 union google::protobuf::internal::EmptyString google::protobuf::internal::fixed_address_empty_string (@internal@proto)
请检查代码中是否有以下代码段:
cppunion google::protobuf::internal::EmptyString;
如果存在,请确保该代码段在protobuf的头文件中正确引用,或者将其移除。
在所在配置完成后编译protobuf时还是提示如下
LNK2001无法解析的外部符号 "union google::protobuf::internal::EmptyString google::protobuf::internal::fixed_address_empty_string" (?fixed_address_empty_string@internal@protobuf@google@@3TEmptyString@123@A)
真坑啊,各种操作猛如虎后结果还是不行。

