zigfreid wrote: ↑Sun Aug 16, 2020 7:14 pm
Similar fix is working also for sokoban_move function. So your Could you explain please the rootcause of my problem? Many thanks.
Did a bit of research as I don't use inline myself ("static" does the job, the compiler will sensibly inline it wherever possible).
What seems to be the case is that in Sokoban, the way it uses "inline", the compiler assumes that it is a separate definition to use when it deducts that the function can be inlined (this should normally be in the header of the module which contains the function's definition). If it deducts that it shouldn't inline, then it expects that the function exists as a normal, callable function (which normally would be in the source of the module whose header contained the inline definition).
So this case what is apparently happening that the compiler decides that it shouldn't inline those, and just compiles the game's source without the function's definition, assuming it comes from another source (another object file). Which is not the case, so the linker complains.
Solution: Probably all "inline"s have to be replaced to "static"s in the games and other sources (likely in most places it is used this way, incorrectly for the compiler).
EDIT: Committed fix. Seems like only MegaSokoban had this sort of problematic inlining.