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

Build failed with gcc (extra qualification on FindNearestMineralPatch) #145

Closed luka-papez closed 7 years ago

luka-papez commented 7 years ago

When building the latest version of this repository on Linux with gcc this error occurs:

error: extra qualification ‘sc2::MultiplayerBot::’ on member ‘FindNearestMineralPatch’ [-fpermissive] const Unit* MultiplayerBot::FindNearestMineralPatch(const Point2D& start); ^~~~~~~~~~~~~~ make[2]: *** [examples/CMakeFiles/bot_micro.dir/bot_micro.cc.o] Error 1 make[1]: *** [examples/CMakeFiles/bot_micro.dir/all] Error 2 make: *** [all] Error 2

A quick Google run finds the fix: https://stackoverflow.com/questions/5642367/extra-qualification-error-in-c

The solution is to simply remove the troublesome qualifier from the header. I do not see any potential problems arising from that removal as that qualifier seems to be Visual Studio optional peculiarity.

AnthonyBrunasso commented 7 years ago

Nice catch! Sorry about that. d8120498ef2a3fbfa3a4d54932e2096bdb5645da