undefined reference to google::protobuf

Open
#96 3 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #134 by @jellespijker — merged

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cmake, cpp
Domain
build-system

Research direction

Start with the reported Windows mingw32-make linker output and inspect the build configuration that produces CMakeFiles/Arcus.dir and libArcus.dll. Compare the issue with merged pull request #134, then verify that a clean Windows build links without the listed protobuf references.

Written by the indexing model from the issue text.

Description

Hello, I am building Cura's build environment, but when I compile libArcus on Windows 7 virtual machine, I met the program link error. In the following section is the specific error message. On this basis, I have installed protobuf and also add it to environment variable.

C:\Cura262LiXianBianYiBao\Build260\libArcus-2.6\libArcus\build>mingw32-make
Scanning dependencies of target Arcus
[ 16%] Building CXX object CMakeFiles/Arcus.dir/src/Socket.cpp.obj
[ 33%] Linking CXX shared library libArcus.dll
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2a3): undefin
ed reference to `google::protobuf::MessageLite::SerializeAsString[abi:cxx11]() c
onst'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2a25): undefi
ned reference to `google::protobuf::io::ArrayInputStream::ArrayInputStream(void
const*, int, int)'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2a9f): undefi
ned reference to `google::protobuf::io::CodedInputStream::Refresh()'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2ab2): undefi
ned reference to `google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int
, int)'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2abf): undefi
ned reference to `google::protobuf::MessageLite::ParseFromCodedStream(google::pr
otobuf::io::CodedInputStream*)'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2b5a): undefi
ned reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2b62): undefi
ned reference to `google::protobuf::io::ArrayInputStream::~ArrayInputStream()'
CMakeFiles\Arcus.dir/objects.a(Socket.cpp.obj):Socket.cpp:(.text+0x2e04): undefi
ned reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'

This problem has been bothering me for a few days. If there is time, please give me some solutions.

Thank you!!!

Dominant language
C++
Stars
78
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Ultimaker/libArcus

All issues in Ultimaker/libArcus

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.