Rob,

Rob Arthan wrote:
Thanks for that. I wasn't seriously expecting to get portabiliity between Linux and MacOS. If I understand you aright, all calls out from compiled ML code go in the saved state go via the ABI offered by libpolyml.so, so if the OS is prepared to load my executable it will run and I don't have to worry about compatibility with other libraries.
Correct. A saved state or an object file exported with PolyML.export never interacts directly with any libraries or the operating system. All calls go through libpolyml. The function-call mechanism within the ML code is designed for light-weight functions and also to ensure that the garbage-collector can find and update all addresses.

I'm not certain of this but I think you need to give the right options
to configure to make sure it's building static libraries.  I've just
tested building Poly/ML with
./configure --disable-shared && make
and it appears to make a statically linked version of "poly".  Poly/ML
uses libtool to do all this so check the documentation for that.



I will look into this and report back. I do have libpolyml.a and libpolymain.a in /usr/local/lib - it is other dependencies that were failing.

Have you tried using libtool? One possibility would be to add your application to Poly/ML's Makefile.am, use automake and autoconf to build "configure" and have libtool take care of everything.

Regards,
David
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to