I thought about this issue and came with the following situation:
The user installed a version of the dynamic library which uses different
compile-time parameters or a different stack allocation than the
executable which was previously installed or installed afterwards.
Then, when running the executable, fc-solve, which directly accesses the
Freecell Solver structures and functions supply it with different
structures than what the library is used to. The result is probably a
crash or something like that.
I can think of several work-arounds to a situation like that:
1. Having fc-solve use the freecell_solver_user library. That would
probably be the best solution in the long run.
2. Supplying freecell_solver_user functions that can be used to determine
the compile-time configuration of the library. If it does not match that
of fc-solve, it will gracefully exit before it does any damage.
3. Statically-linking fc-solve. This will have the unfortunate downside of
enlarging it, and by that we will save less space.
Now games, which use the freecell_solver_user interface (which is what
games should do) should have no problem as that interface is not dependant
on the compile-time configuration of the library. But, at present,
fc-solve does not uses it, so it could be a problem.
Furthermore, the representation of the states (especially the flags of
state_with_locations) can be subject to change in further versions of
Freecell Solver, and it may also create incompatibility with other
versions.
For the time being, I suggest to make the executable package depend on
the exact version of the library version. Hopefully, this restriction will
be removed when fc-solve make use of freecell_solver_user instead. Perhaps
it is something I need to work on for the 1.8.0 release.
Regards,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish shlomif_at_vipe.technion.ac.il
Home Page:
http://t2.technion.ac.il/~shlomif/
Home E-mail: shlomif_at_techie.com
A more experienced programmer does not make less bugs. He just realizes
what went wrong more quickly.
Received on Mon Jun 11 2001 - 21:03:14 IDT