-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
Linking error when building with new 3.21.1 version #10163
Comments
@StavrosMar I think the likely problem is that you rebuilt your generated code with the new protoc but did not upgrade libprotobuf (or libprotobuf-lite). For C++ the protoc version must exactly match the libprotobuf version as we don't support mixing different versions this way. |
@acozzette when running nm on the libprotobuff under /usr/local/lib I can see that the InternalMetadata objects are in there. The CMake is using the library under /usr/local/lib, I am thinking to just move the code manually inside the message_lite.h and problem should be solved, what do you think ? |
Actually from looking more closely I believe this has to do with mixing optimized and unoptimized code. The decision of whether to put this destructor in the header or .cc file is determined by the |
Thank you , I will set it on my cmake and see if it works , I will close the issue |
What version of protobuf and what language are you using?
Version: main/v3.21.1
Language: C++
What operating system (Linux, Windows, ...) and version?
MacOS 11.4
What runtime / compiler are you using (e.g., python version or gcc version)
Apple clang version 12.0.5 (clang-1205.0.22.11)
What did you do?
Steps to reproduce the behavior:
What did you expect to see
No Linkage issue should happen
What did you see instead?
Linkage issue when building the C++ project with CMake.
The text was updated successfully, but these errors were encountered: