Sorry I meant upgrade to 3.20.x. But I also got the same error with version 3.19.x.
On Friday, November 25, 2022 at 11:28:51 AM UTC-5 Ed Hourigan wrote: > I recently updated from 3.17.3 to 3.19.x and now I cannot compile: > > /usr/local/google/protobuf-3.20.x/include/google/protobuf/endian.h:150:17: > error: conflicting declaration of C function ‘uint32_t > google::protobuf::internal::big_endian::FromHost(uint32_t)’ > > Nothing has changed in my build environment: > Linux Ubuntu 22.04.1 > gcc/g++ : g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 > > If I switch back to 3.17.3, the problem goes away. > > Here is how I run protoc: > /usr/local/google/protobuf-3.20.x/bin/protoc -I=. --cpp_out=. > > And here is g++ compile line: > > g++ -c -m64 -x c++ -std=c++17 -Wall > -I/usr/local/google/protobuf-3.20.x/include > -I/usr/local/google/protobuf-3.20.x/include/google > > -- 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/bd0ed5a3-9205-4c84-848c-1e08af7257bfn%40googlegroups.com.
