Dimitri-Bit / Simple-Chess-Engine

Simple minimax chess engine in C++
1 stars 0 forks source link

can not compile on Linux #1

Open tissatussa opened 2 months ago

tissatussa commented 2 months ago

although your engine is simple, i like to compile it but this fails .. i used the following command to compile :

$ clang++-16 *.cpp -O3 -o mychessengine -lpthread -lm
In file included from engine.cpp:6:
In file included from ./search.hpp:1:
./evaluation.hpp:22:35: error: no member named 'VALUE' in namespace 'POSITIONAL_VALUE'; did you mean 'MATERIAL_VALUE::VALUE'?
        evaluation = evaluation + POSITIONAL_VALUE::VALUE[piece][squareInt];
                                  ^~~~~~~~~~~~~~~~~~~~~~~
                                  MATERIAL_VALUE::VALUE
./constants.hpp:29:15: note: 'MATERIAL_VALUE::VALUE' declared here
    const int VALUE[12] = {
              ^
In file included from engine.cpp:6:
In file included from ./search.hpp:1:
./evaluation.hpp:22:65: error: subscripted value is not an array, pointer, or vector
        evaluation = evaluation + POSITIONAL_VALUE::VALUE[piece][squareInt];
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
2 errors generated.

indeed in constants.hpp no VALUE array is defined inside the POSITIONAL_VALUE structure .. at the end of this file you commented-out such code, it's not complete .. i tried to fix it but i have no clue (i'm not into C++). Can it be solved ?

[ i'm on Xubuntu 22.04 ]

Dimitri-Bit commented 2 months ago

Hello,

I appreciate your interest in my engine! Unfortunately its currently not working, I started to do some refactoring, which messed up the code-base, and haven't finished it. I will start working on it again as soon as my exams end in a month or so. I can update this PR after its functioning again.

tissatussa commented 2 months ago

..and haven't finished it..

OK, nevermind. success with the exams!

https://github.com/Dimitri-Bit/Simple-Chess-Engine/assets/1109281/31d70a4c-fd03-4d44-9d97-19f6fc039449

i'll receive all your GitHub notices, so .. and i can test, but only on Linux :)