jasper-sinclair / kobra

UCI chess engine
GNU General Public License v3.0
1 stars 0 forks source link

can't compile v1.0a (on Linux) #4

Closed tissatussa closed 7 months ago

tissatussa commented 7 months ago

i get these errors :

$ make
g++-13 -std=c++20 -static -DNDEBUG -march=native -c -o attack.o attack.cpp
In file included from attack.h:2,
                 from attack.cpp:1:
bitboard.h: In function ‘void zobrist::init()’:
bitboard.h:461:36: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
  461 |       for (unsigned long long& j : i) j = RandU64();
      |                                    ^
bitboard.h:464:34: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
  464 |     for (unsigned long long& i : castling) i = RandU64();
      |                                  ^~~~~~~~
bitboard.h:465:34: error: cannot bind non-const lvalue reference of type ‘long long unsigned int&’ to a value of type ‘long unsigned int’
  465 |     for (unsigned long long& i : en_passant) i = RandU64();
      |                                  ^~~~~~~~~~
make: *** [<builtin>: attack.o] Error 1

note: in makefile i had to change g++ version to g++-13, otherwise many other errors came ..

[ i'm on Xubuntu 22.04 ]

tissatussa commented 6 months ago

also v1.1 has this issue .. i'm on Linux, maybe your code works on Windows but the error message indicates a basic type mismatch.