Skip to content

error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage #19831

Open
@phongnguyen1023

Description

@phongnguyen1023

When building Protobuf 3.29.2, I added \third_party\abseil-cpp\ to build. So I have an issue

libprotobuf.lib(descriptor.pb.cc.obj) : error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<unsigned __int64,0>(unsigned __int64 const &)" (??$?6_K$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEB_K@Z) libprotobuf.lib(feature_resolver.cc.obj) : error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<unsigned __int64,0>(unsigned __int64 const &)" (??$?6_K$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEB_K@Z) libprotobuf.lib(repeated_ptr_field.cc.obj) : error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<unsigned __int64,0>(unsigned __int64 const &)" (??$?6_K$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEB_K@Z) libprotobuf.lib(extension_set_heavy.cc.obj) : error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<unsigned __int64,0>(unsigned __int64 const &)" (??$?6_K$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEB_K@Z) libprotobuf.lib(extension_set.cc.obj) : error LNK2001: unresolved external symbol "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<unsigned __int64,0>(unsigned __int64 const &)" (??$?6_K$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEB_K@Z)

I set default CMakeLists.txt for Protobuf, abseil-cpp, utf8_range. Looks like a compiler issue.
Is there any way to fix the above issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions