Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phongnguyen1023 opened this issue Jan 2, 2025 · 2 comments

Comments

@phongnguyen1023
Copy link

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?

@honglooker
Copy link
Contributor

Hi @phongnguyen1023, thank you for the report. To help us repro, do you mind filling this out? Thank you.

**What version of protobuf and what language are you using?**
Version: main/v3.6.0/v3.5.0 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem)
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript

**What operating system (Linux, Windows, ...) and version?**

**What runtime / compiler are you using (e.g., python version or gcc version)**

**What did you do?**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**What did you expect to see**

**What did you see instead?**

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

@honglooker honglooker added wait for user action and removed untriaged auto added to all issues by default when created. labels Jan 6, 2025
@Mizux
Copy link
Contributor

Mizux commented Jan 17, 2025

it is a windows MSVC error (.lib and error LNK2001:) ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants