Closed mr2anderson closed 1 year ago
Hello! I am not a C++ expert, but here is how I solved the issue for me.
I removed the word constexpr in several places:
tables.cpp:160: /*constexpr*/ Bitboard get_rook_attacks(Square square, Bitboard occ) {
tables.cpp:226: /*constexpr*/ Bitboard get_bishop_attacks(Square square, Bitboard occ) {
tables.h:21: extern /*constexpr*/ Bitboard get_rook_attacks(Square square, Bitboard occ);
tables.h:32: extern /*constexpr*/ Bitboard get_bishop_attacks(Square square, Bitboard occ);
types.cpp:125: /*constexpr*/ Square bsf(Bitboard b) {
types.h:113: extern /*constexpr*/ Square bsf(Bitboard b);
I removed the word inline in several places:
types.cpp:86: /*inline*/ int pop_count(Bitboard x) {
types.cpp:95: /*inline*/ int sparse_pop_count(Bitboard x) {
types.cpp:118: /*inline*/ Square pop_lsb(Bitboard* b) {
types.h:107: extern /*inline*/ int pop_count(Bitboard x);
types.h:108: extern /*inline*/ int sparse_pop_count(Bitboard x);
types.h:109: extern /*inline*/ Square pop_lsb(Bitboard* b);
After that, I could compile with g++ -o test *.cpp -lstdc++
.
Thank you!
I have troubles with compiling this program on Linux (Debian 11 stable, gcc 10.2.1-6). I tried to compile this with different C++ versions (C++14, C++17, C++20) but I had those error messages every time:
P.S. Sorry for my bad english.