dshawul / Scorpio

Scorpio chess engine
Other
81 stars 19 forks source link

Another Compile issue :) #21

Open RichardPortelli opened 2 years ago

RichardPortelli commented 2 years ago

Hello again,

I think you are still trying to call san_mov even if the macro BOOK_CREATE is not defined, which leads to an undefined reference ;-) (util.cpp)

/usr/bin/ld: build/intermediate/Release/util_5f0290dd.o: in function SEARCHER::pgn_to_epd(char*, _IO_FILE*, int)': util.cpp:(.text+0x6248): undefined reference toSEARCHER::san_mov(unsigned int&, char*)' collect2: error: ld returned 1 exit status

Thanks

dshawul commented 2 years ago

Thanks again! I have fixed these issues by removing conditional compilation code that is really unnecessary at this point. c78d90706059a639f4a40

RichardPortelli commented 2 years ago

Hello again Daniel :) Thanks for fixing the issues so quickly. It's still not compiling on Linux because of your DEFINES MAX and MIN in Scorpio.h. It's a weird known bug caused by a mix of stl header inclusion and definition of defines, that happens a lot on Linux unfortunately. Even renaming the defines with MAX_SCORPIO and MIN_SCORPIO doesn't solve the issue.

I was forced to replace in your code the defines of MAX,MIN distance and DISTANCE by simple template methods and do the appropriate casts in the code.

I attach a screenshot of what I mean ;) If you are interested to merge these changes, I can push a pull request, please let me know.

Have a great day, Richard Screen

dshawul commented 2 years ago

Hi Richard, Thanks for fix! Please submit a pull request of your changes.