pkrisz99 / Renegade

A strong chess engine using a neural network to evaluate positions
https://lichess.org/@/RenegadeEngine
MIT License
24 stars 2 forks source link

compile error on Linux : solved #28

Closed tissatussa closed 5 months ago

tissatussa commented 6 months ago

when compiling the source of v1.1.0 (dev 24 / PR 27) on Linux (Xubuntu 22.04), using the makefile, i get this error: NOTE: in the makefile i changed clang++ to clang++-16

Magics.cpp:145:5: error: return type 'unsigned long long' must match
previous return type 'uint64_t' (aka 'unsigned long')
when lambda expression has unspecified explicit return type
                                return 0ull;

i found a solution to meet the message and solve the error by changing return 0ull into return 0ul.

concerning this 'value construct' in C++ : at https://stackoverflow.com/questions/7036056/what-do-0ll-or-0x0ul-mean i read :

each L or l represents a long and each U or u represents an unsigned
pkrisz99 commented 6 months ago

Thanks for reporting this, glad that you've found a way to resolve it. I'll look into this soon.

pkrisz99 commented 5 months ago

I was a bit busy, but finally got around to fixing this in https://github.com/pkrisz99/Renegade/commit/1e4f9d96c302faa4c8d63290f634e324d2e20d89. Worked for me under both clang and g++.

In the future I would like to add some kind of automated testing to catch these problems. Until then, feel free to report these issues as I might not be aware of them.