0

I compiled the ExampleAIMoudle of openbw/bwapi on OS X, I build it with:

cmake CMakeLists.txt
make

And I got the error:

bwapi/bwapi/ExampleAIModule/../include/BWAPI/Position.h:378:9: warning:
      in-class initialization of non-static data
      member is a C++11 extension
      [-Wc++11-extensions]
    T x = T{}, y = T{};
        ^
bwapi/bwapi/ExampleAIModule/../include/BWAPI/Position.h:378:18: warning:
      in-class initialization of non-static data
      member is a C++11 extension
      [-Wc++11-extensions]
    T x = T{}, y = T{};
                 ^
bwapi/bwapi/ExampleAIModule/../include/BWAPI/Position.h:378:12: error:
      expected '(' for function-style cast or type
      construction
    T x = T{}, y = T{};
          ~^
bwapi/bwapi/ExampleAIModule/../include/BWAPI/Position.h:378:21: error:
      expected '(' for function-style cast or type
      construction
    T x = T{}, y = T{};
                   ~^
bwapi/bwapi/ExampleAIModule/../include/BWAPI/Position.h:94:19: error:
      no member named 'tie' in namespace 'std'; did
      you mean 'time'?
      return std::tie(this->x, this->y) == st...
             ~~~~~^~~
                  time

You can found code here

guilin 桂林
  • 17,050
  • 29
  • 92
  • 146
  • 1
    Have you tried to specify that you want to compile with C++11 support enabled? e.g., as in here: https://stackoverflow.com/q/42834844/1025391 ... or use a compiler which has this setting enabled by default. – moooeeeep Oct 13 '17 at 07:26
  • @moooeeeep thanks, it works. – guilin 桂林 Oct 13 '17 at 08:05

0 Answers0