s2client-api icon indicating copy to clipboard operation
s2client-api copied to clipboard

Compiling error: sc2api.pb.h not found

Open djurosaur opened this issue 6 years ago • 4 comments

Followed the steps for compiling this. https://github.com/Blizzard/s2client-api/blob/master/docs/building.md

Only command i changed is cmake ../ -G "Visual Studio 15 2017 Win64"

cmake ../ -G "Visual Studio 16 2019"

Could that be issue?

djurosaur avatar Aug 14 '19 23:08 djurosaur

Fix for this is to change file s2client-api\contrib\protobuf\src\google\protobuf\compiler\java\java_file.cc

L68: bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) const { ... }

There is missing 'const'.

djurosaur avatar Aug 15 '19 21:08 djurosaur

I have the same issue and I tried your suggestion but it doesn't seem to change anything; still get the same error

RobbyG avatar Aug 16 '19 22:08 RobbyG

I'm also having this problem. I added the const to the java_file.cc, but it didn't help. Using this command, cmake ../ -G "Visual Studio 16 2019" But when I try to compile it in Visual Studio 2019, I get the the compiling error that sc2api.pb.h is missing.

Weedlepickles avatar Jan 15 '20 22:01 Weedlepickles

@Weedlepickles you should update the protobuf submodule or use older VS.

alkurbatov avatar Jan 16 '20 09:01 alkurbatov