MAKING MLKIT CROSSCOMPILE APPLICATIONS FROM LINUX TO WINDOWS


Welcome | Company profile | Products | Freware | Private

Introduction

This document describes how to make DIKU's Standard ML compiler MLKit crosscompile applications from Linux to Windows. It's not a complete port of MLKit, so things like profiling does not work and some things in the SML basis library will not work. It requires (among other things) the SML/NJ compiler and a gcc native compiler and a gcc crosscompiler and possibly some patience.

Just follow the description in this document step by step and hopefully it will work :)

Do what is described in this document step by step...

The basic setup

First install and compile a native Linux version of MLKit. You might want this compiler for compiling your applications natively. I recommend using SML/NJ version 110.0.6 for compiling and installing MLKit. In particular I know that MLKit does NOT compile with SML/NJ working version 110.9.1 and that SML/NJ version 110.0.3 has memory leaks in it's garbage collector.

Then install MLKit again somewhere else. Now also compile this as a native Linux compiler. When this second native MLKit compiler has been compiled you should modify the sourcecode as described below.

Sourcecode patches

Do the following in the order described:

If all went well you now have some working runtime libraries ready to be linked with when crosscompiling. When crosscompiling, you need to change the libraries that MLKit links with. In the MLKit menu you just go to Control and choose: link with library. If you're crosscompiling SDL applications you should type "-lmingw32 -mwindows -L/usr/local/lib -lSDL". If you're compiling without SDL, I'm not sure which libraries to link with, but possibly some of those mentioned above :)

Hopefully you're all set. Now you might want to check out how to use my SDL bindings for ML - SDL::ML.


- ÁNOQ of the Sun


Modified: 1999-11-27
E-mail:anoq@HardcoreProcessing.com