jonathanmcdermid / Clovis

MIT License
4 stars 2 forks source link

Does not compile under Windows #1

Closed SzotsGabor closed 1 year ago

SzotsGabor commented 2 years ago

Lots of errors:

position.cpp: In member function 'bool Clovis::Position::do_move(Clovis::Move, bool)': position.cpp:303:9: error: jump to label 'nullmove' 303 | nullmove: | ^~~~ position.cpp:208:22: note: from here 208 | goto nullmove; | ^~~~ position.cpp:213:19: note: crosses initialization of 'Clovis::Piece piece' 213 | Piece piece = move_piece_type(m); | ^~~~~ position.cpp:212:20: note: crosses initialization of 'Clovis::Square tar' 212 | Square tar = move_to_sq(m); | ^~~ position.cpp:211:20: note: crosses initialization of 'Clovis::Square src' 211 | Square src = move_from_sq(m); | ^~~ position.cpp: In member function 'void Clovis::Position::undo_move(Clovis::Move)': position.cpp:388:5: error: jump to label 'nullmove' 388 | nullmove: | ^~~~ position.cpp:350:18: note: from here 350 | goto nullmove; | ^~~~ position.cpp:353:16: note: crosses initialization of 'Clovis::Square tar' 353 | Square tar = move_to_sq(m); | ^~~ position.cpp:352:16: note: crosses initialization of 'Clovis::Square src' 352 | Square src = move_from_sq(m); | ^~~ search.cpp: In function 'void Clovis::Search::init_lmr_tables()': search.cpp:36:60: error: 'log' was not declared in this scope; did you mean 'long'? 36 | lmr_table[depth][ordered] = int(0.75 + log(depth) * log(ordered) / 2.25); | ^~~ | long search.cpp: In function 'Clovis::Move Clovis::Search::start_search(Clovis::Position&, SearchLimits&)': search.cpp:107:9: error: jump to label 'end' 107 | end: | ^~~ search.cpp:59:22: note: from here 59 | goto end; | ^~~ search.cpp:69:17: note: crosses initialization of 'int beta' 69 | int beta = POS_INF; | ^~~~ search.cpp:68:17: note: crosses initialization of 'int alpha' 68 | int alpha = NEG_INF; | ^~~~~

jonathanmcdermid commented 2 years ago

Should be fixed in release 1.1!

SzotsGabor commented 2 years ago

Yes, it is all right now.

However:

  1. If I leave the makefile where it is (outside of src) then I get File not found - .cpp File not found - .cpp g++: fatal error: no input files compilation terminated. mingw32-make: *** [Makefile:11: build/Clovis] Error 1
  2. If I move the makefile to the src folder then I get FIND: Parameter format not correct FIND: Parameter format not correct g++: fatal error: no input files compilation terminated. mingw32-make: *** [Makefile:11: build/Clovis] Error 1

So I had to compile it directly via the command "g++ *.cpp -O3 -march=native -flto -oClovis_1.1-x64-SzG.exe"

Please note that I am a complete stranger to makefiles so I don't know how to edit the makefile to fix the above issue.