The X-Windows/Motif code still builds as far as I'm aware but that's as far as it goes. I would say it was better to use something else through CInterface.
The Poly/ML interactive environment (read-eval-print loop or REPL) is usually the easiest way to develop and test your code. It prints the types and values of top-level expressions. When building an application it is probably easier to use "polyc". This is really a wrapper script for "poly" which compiles, exports and links a stand-alone application. You need to define a function called "main" that is the root function of your application.
$ cat > testme.ML fun main() = print "Hello World\n"; $ polyc testme.ML $ ./a.out Hello World
David
On 09/12/2014 17:25, David Topham wrote:
Thanks for your reply Richard, I will look into using CInterface. That makes me think that another approach could be to use an imperative language for the GUI and link in the ML functions! That way existing GUI builders could be used. I will experiment. I scannned through your work on wrapping SDL and find it interesting. Since I am new to ML could you supply a short demo of how one would integrate those into a complete example? (I think SDL is supplied with TinyCore, so I will test it there). I noticed when loading the Motif library in PolyML (the use command), that the screen would display each function as it is loaded. Do you know if there is a way to create a standalone app that does not bombard the user with that kind of loading info? e.g. When you start up your SDL game, does it scroll through screens of info before game starts? -Dave