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 282 forks source link

Compile tutorial.cc broken on Linux? #318

Closed brancoliticus closed 5 years ago

brancoliticus commented 5 years ago

My system is a Debian 9. I followed the build guide to the letter, cloning recursively but I have the same king of problems as in issue #83. If someone could help me out figure how to solve building the tutorial examples.

Below is every command I entered and it's output starting from the git clone, towards the bottom there are the compilation commands with output after several attempts to edit files to make the compilation work:

compiler_error_output2.txt

alkurbatov commented 5 years ago

Hi @brancoliticus Seems that this happens because you have another version of Protobuf installed in your system. See the following error: ../include/sc2api/../../build/generated/s2clientprotocol/sc2api.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please

I would recommend you to use cmake and make instead of pure call to g++.

brancoliticus commented 5 years ago

Yes I installed the debian protocol buffers but that wasn't when my troubles started. Please look further back in the output I uploaded to before the installation of the debian protocol buffers. Thank you.

alkurbatov commented 5 years ago

Could you please point at the exact line? So far I see that you've compiled the sources successfully. As a result, the examples were compiled too (try to do from the build folder: ls bin/tutorial). The following command is definitely incorrect as it requires paths to include folders and linking flags: g++ tutorial.cc -o /home/brancoliticus/tutorial_SC2

brancoliticus commented 5 years ago

I didn't realise that the compilation of the API will also compile the examples. This clears the matter for me. Thank you for your time.