Related articles |
---|
Help a newbie understand how to create a "native library" for any new rdc02271@yahoo.com (rdc02271) (2005-05-14) |
Re: Help a newbie understand how to create a "native library" for any haberg@math.su.se (2005-05-14) |
Re: Help a newbie understand how to create a "native library" for any skandgoe@gwdg.de (Skandinavisches Seminar) (2005-05-14) |
Re: Help a newbie understand how to create a "native library" for any haberg@math.su.se (2005-05-15) |
From: | haberg@math.su.se (Hans Aberg) |
Newsgroups: | comp.compilers |
Date: | 14 May 2005 16:47:07 -0400 |
Organization: | Mathematics |
References: | 05-05-093 |
Keywords: | practice, linker |
Posted-Date: | 14 May 2005 16:47:06 EDT |
"rdc02271" <rdc02271@yahoo.com> wrote:
> When you create a new langauge like D how do you create the libraries
> to work with the operating system (for instance Windows) ? Do you
> create wrappers around the OS API or do you create assembly code to
> work with the Operating system? For instance : window management -
> How would you create a D(X,Y,Z,etc) compatible library to work with
> the operating system window management system? Or would you create on
> your window management system?
If you work on UNIX, there is system language, C, and a usually a
system supplied compiler. Then the first, simple, step is to implement
libraries via the system language. Your language could for example
output C code, which then is compiled. Some C++ compilers are using
this approach, and also the Haskell compiler GHC
haskell://haskell.org.
The next step would be to study the file formats for object code on
the system and write directly for that one. For example, Mac OS X is
using standard binary formats picked up form some different
places. But this requires more work.
--
Hans Aberg
Return to the
comp.compilers page.
Search the
comp.compilers archives again.