Thanks for your response. Some of the external libraries come prebuilt probably with libstdc++ there should be some way to mix this with the rest of the program otherwise it would be difficult for every larger project, right?
Samuel Benzaquen schrieb am Donnerstag, 11. Juli 2024 um 00:22:19 UTC+2: > On Wed, Jul 10, 2024 at 2:12 PM 'Edgar Neubauer' via Protocol Buffers < > [email protected]> wrote: > >> Greetings, >> >> I try to link a C++17 app previously built with g++ 12 for c++17 now with >> clang++-17 and libc++ against an 3.18.2 protobuf version which is >> required. However, some of the app headers produce linker errors like these: >> > > Version 3.18 is pretty old and no longer supported. > See https://protobuf.dev/support/version-support/ > > >> >> config.hpp:69: undefined reference to >> `google::protobuf::MessageLite::ParseFromIstream(std::__1::basic_istream<char, >> >> std::__1::char_traits<char> >*)' >> >> As far as I know std::__1 is C++11, in 17 it's std::placeholders::__1 . >> > > `__1` is an internal inline namespace used by the standard library to add > a unique mangled name when they change the ABI. > For example, when using the unstable ABI in libc++ they use `__u` instead. > It is not related to the placeholders. Note that it has two underscores. > > >> Can this be explained by protobuf being built against std=c++11 and the >> app against 17? >> I tried to switch everything in protobuf configure.ac to c++17 It seems >> to me that libprotobuf.so.29.0.2, libprotoc.so.29.0.2: and >> libprotobuf-lite.so.29.0.2 >> still have c++11 symbols. >> > > I don't think the language version is the issue. This sounds like you are > mixing libraries. > Like you are compiling part of your program against one version of the > standard library (eg libc++ from clang) and other parts with another > standard library (eg libstdc++ from gcc). > Mixing standard libraries is not generally supported since they have > different ABIs. > You have to make sure that every library in your binary is built against > the same standard library, with the same compiler options. > > >> >> >> Any ideas? >> >> Regards >> >> -- >> 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/25092f8f-8040-494b-b657-a904103c6879n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/protobuf/25092f8f-8040-494b-b657-a904103c6879n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/af189230-c20b-4862-bc85-2f6aa8d67d73n%40googlegroups.com.
