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/142a6522-711f-401b-865e-55392439c4dbn%40googlegroups.com.

Reply via email to