Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 281 forks source link

Compiling error: sc2api.pb.h not found #319

Open djurosaur opened 5 years ago

djurosaur commented 5 years ago

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 commented 5 years ago

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'.

RobbyG commented 5 years ago

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

Weedlepickles commented 4 years ago

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.

alkurbatov commented 4 years ago

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