I'm attempting to develop a program to demonstrate the use of protobuf.
Package Manager : vcpkg
C++ Standard : C++20
Microsoft Visual C++ 2022
Install Log
vcpkg.exe install protobuf
Computing installation plan...
The following packages are already installed:
protobuf[core]:x64-windows -> 3.21.4
protobuf:x64-windows is already installed
Restored 0 package(s) from C:\Users\DarkSorrow\AppData\Local\vcpkg\archives in 409.1 us. Use --debug to see more details.
Total elapsed time: 130.8 ms
protobuf provides CMake targets:
# this is heuristically generated, and may not be correct
find_package(protobuf CONFIG REQUIRED)
target_link_libraries(main PRIVATE protobuf::libprotoc protobuf::libprotobuf protobuf::libprotobuf-lite)
I am getting the bellow mentioned error.
Error :
fatal error C1189: #error: This file was generated by an older version of protoc which is
I have not written any code but only included the generated file in the project.
Code Generation :
protoc test.proto --cpp_out=.
Code (test.proto) :
syntax = "proto3";
message Person {
optional string name = 1;
optional int32 id = 2;
optional string email = 3;
}
Protocol Buffer Generator Version
protoc --version
libprotoc 3.16.0