Hugs on Mac with CW6 ? ... and Haskell Graphics Lib?

Hans Aberg haberg@matematik.su.se
Fri, 8 Dec 2000 10:38:37 +0100


At 13:43 -0700 0-12-07, Alastair Reid wrote:
>   2) Use GreenCard (http://www.dcs.gla.ac.uk/fp/software/green-card/)
>      Stable, simple, limited level of support (none?)
>      Requires you to find out how to build the Mac equivalent of
>      shared libraries (Unix terminology) or DLLs (Windows terminology).
>      (Looking at the Hugs sources, it appears that the answer is a .pef
>      file and that someone has figured this out before - hopefully
>      someone can send instructions in response to this message.)

I'm afraid I was the guy who put that "pef" stuff in, which does not
directly related to DLL. ("PEF" = portable executable format or something
is a slimmed down variation of IBM's XCOFF format for object files that
contains names admitting various types of linking -- possibly dynamic and
solving the fragile base class problem.)

Dynamic loading under pre-MacOS X though is very complicated, especially if
the loading should take place while your program is running (and not only
under startup). So I eventually gave up on that, because I didn't have time
for it.

By contrast DLL under MacOS X seems to be automatic -- one simply requests
the functions in the source code just as any statically linked function,
and the OS loads them "lazily" at need when required. So, by contrast,
anything that can be done with DLL seems to be recommended under MacOS X.

  Hans Aberg