Open Chaojimengnan opened 2 years ago
Hi @Chaojimengnan This API is outdated and doesn't support fresh tools, please try with https://github.com/cpp-sc2/cpp-sc2 Another solution is manual update of the protobuf submodule.
Hi @Chaojimengnan This API is outdated and doesn't support fresh tools, please try with https://github.com/cpp-sc2/cpp-sc2 Another solution is manual update of the protobuf submodule.
It works, thank you!!
@alkurbatov hi Can you please tell me where is the root of the problem? what needs to be updated and edited? I have the same problem in another project.
Hi @Andrysky The root is in the newer compiler. Simple fix for this problem (in case you don't want to use my fork) is to update the protobuf submodule, all the needed fixes are already there.
We found next fix:
modified Libs/third_party/protobuf/protobuf-3.0.0/src/google/protobuf/repeated_field.h
@@ -294,6 +294,9 @@ template<typename Element>
const size_t RepeatedField<Element>::kRepHeaderSize =
reinterpret_cast<size_t>(&reinterpret_cast<Rep*>(16)->elements[0]) - 16;
+const size_t RepeatedField<int32>::kRepHeaderSize =
+ reinterpret_cast<size_t>(&reinterpret_cast<Rep*>(16)->elements[0]) - 16;
+
namespace internal {
template <typename It> class RepeatedPtrIterator;
template <typename It, typename VoidPtr> class RepeatedPtrOverPtrsIterator;
Work on Visual Studio 2022 Version 17.7.0
I used VS2022 and CMake version 3.21.1 for the build. Here is my error message:
This looks like protobuf's problem, here is the definition of
kRepHeaderSize
, I don't think there is something wrong, but it gets error