kanin9 / mufasa

UCI compatible bitboard chess engine written in C++
GNU General Public License v3.0
3 stars 0 forks source link

compile v0.2 : error solved (and remarks) #2

Closed tissatussa closed 3 months ago

tissatussa commented 3 months ago

i just compiled your v0.2 and it runs fine in CuteChess GUI. but i had a few errors (in fact only one) when compiling :

In file included from /home/roelof/Apps/Cmake/cmake-3.29.2-linux-x86_64/bin/src/bitboard.cpp:1:
/home/roelof/Apps/Cmake/cmake-3.29.2-linux-x86_64/bin/src/bitboard.hpp:59:14: error: ISO C++ forbids declaration of ‘operator==’ with no type [-fpermissive]
   59 |       friend operator==(const Move& lhs, const Move& rhs);
      |              ^~~~~~~~
/home/roelof/Apps/Cmake/cmake-3.29.2-linux-x86_64/bin/src/bitboard.cpp:52:4: error: ISO C++ forbids declaration of ‘operator==’ with no type [-fpermissive]
   52 |    operator==(const Move &lhs, const Move &rhs){
      |    ^~~~~~~~

i solved it by consulting ChatGPT (which is often a great help for debugging code!), see this session.

in general your code looks nice.

i have some remarks :

in /src i find a file of 40.6 Kb without a real name, it's called '.' or so (just some dot, no extension) .. i never saw such thing .. is it intentional ? I think you should avoid a file name like that because it's confusing (but i guess it's a valid name).

i see an output line like info depth 100 score cp (#) at the end of every calculation .. and that score cp value (#) often differs from the previous one. Why 100 ? What does it mean ? I think such line is superfluous.

your README.md is a bit malformed, my viewer (Okular) has trouble displaying lines inside the tripple backticks .. i encounter many README.md files having the same issue .. probably Okular is flawed here, but i discovered it's easy to fix : put an empty line before and after those tripple backticks, that's all.

kanin9 commented 3 months ago

Thanks for feedback.

I think the single quote file in source directory is just an artifact of my code editor because it is surely not intentional. Considering other things mentioned, I have rolled out a new commit with all the fixes. You can try to recompile the code, it should not throw error messages now.

Best of luck!

tissatussa commented 3 months ago

..it should not throw error messages now

indeed, compiling went without any warnings or errors and gave me a binary of 1.5 Mb which runs fine in CuteChess.

i'm closing this Issue.