First of all: Thanks for your response! Yeah I noticed that aswell (the version being very old). I haven't done any work on the project myself yet thats why I didnt bother upgrading yet. Is it possible to upgrade without getting into any version conflicts?
The command I'm trying to compile with is: cmake -std=c++11 "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$COMPILER .. make -j2 with $COMPILER beeing set to either *"/usr/bin/clang++"* or *"/usr/bin/g++"*Ive also tried adding *-D_GLIBCXX_USE_CXX11_ABI=0 *to the command since I read somewhere, that this might fix errors when using old libs with newer compilers [email protected] schrieb am Montag, 1. August 2022 um 19:23:26 UTC+2: > 3.9.1 is a very old version of protobuf. If it's possible to upgrade to a > newer version you would get access to newer features and we can > support/debug easier. Is there any reason to stay at 3.9.1? If you change > that will it fix the problem? > > When you say "trying to compile" what command are you running exactly? > > On Friday, July 29, 2022 at 3:18:37 AM UTC-7 [email protected] wrote: > >> Hello! >> I am trying to resurrect a project from 2020 which is using protobuf. >> >> It comes with a script to install dependencies wich installs protobuf >> like this: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> * wget >> https://github.com/google/protobuf/releases/download/v${PROTO_V}/protobuf-all-${PROTO_V}.zip >> >> <https://github.com/google/protobuf/releases/download/v$%7BPROTO_V%7D/protobuf-all-$%7BPROTO_V%7D.zip> >> >> > /dev/null unzip protobuf-all-${PROTO_V} > /dev/null cd >> protobuf-${PROTO_V} ./autogen.sh > /dev/null if [ "$COMPILER" = "clang++" >> ]; then ./configure CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 >> -g' > /dev/null else ./configure CXX=g++ CXXFLAGS='-std=c++11 -O3 -g' > >> /dev/null fi make -j4 > /dev/null sudo make install > /dev/null sudo >> ldconfig > /dev/null*which seems to work: >> >> >> >> *protoc --versionlibprotoc 3.9.1*The project is then compiled via >> another script which does so by either using Clang (version 5 or newer) or >> gcc (version 7 or newer) (according to doc). >> >> I've got >> >> *gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)Ubuntu clang version >> 14.0.0-1ubuntu1* >> installed. >> >> However when trying to compile I get like 50+ of those errors: >> *undefined reference to `google::protobuf::.....* >> >> While googeling for a fix, I found that this may have to do with an >> update to the compilers, however non of the fixes I found seemed to work >> out for me :( >> >> Can anyone help me out on this? >> >> Looking forward to hearing from you, >> Florian >> > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/ee13762a-de64-40f8-8884-6ec5be3226f1n%40googlegroups.com.
