Custom Compiler and Shared Libs

From: Matt Murrell (mmurrell_at_gmail.com)
Date: 05/25/04


Date: 25 May 2004 13:31:41 -0700

For a class I am creating a new language and writing an interpreter
and I am also considering writing an x86 compiler for it. It would be
greatly beneficial if I could link to pre-existing libraries (for
common functions, console i/o, file i/o, sockets, etc.) rather than
recreate this stuff.

First, is this feasible. In my (although limited understanding) I
could port a few simple headers that declare functions as external. Am
i correct to assume all that remains would be the process of linking
(to either shared or dynamic libraries)?

Second, can anyone point me to some web sites or references that
document the format of these libraries, and how one would link these
together.

I know my questions are vague in nature, but any help would be
appreciated.
Thank you.



Relevant Pages

  • Re: build faster
    ... Which is faster right now, locating testing and learning the library, writing your own, or just coding from scratch. ... In addition to writing reuseable code you should be writing expandable code that is backward compatible. ... Now I see a lot of work other programmers have done where there is no OO, there often are no functions, this is all embedded calls and includes in html. ... A competent programmer seldom starts from scratch and has libraries of code which can be used on almost any project ...
    (comp.lang.php)
  • Re: use of backward single quote in procedure names, was: DST (summer time) offset
    ... I admit to writing certain classes of thing in BASIC and other classes ... that gets you beyond the standard C libraries. ... RISC OS language discussion) and I'll bother to answer. ... has no pre-run-time syntax checking ...
    (comp.sys.acorn.programmer)
  • Re: ML vs. Lisp
    ... would be better off writing *ML, or are you being ironic again? ... Look at LAPACK, FFTW, GLU and GTK from OCaml for example. ... I don't use many C libraries and the ones ... Use a common language run time like .NET. ...
    (comp.lang.functional)
  • Re: Fn Defn Style
    ... When I'm writing something alone, I do find that the benefits of heavy ... I actually find it easier to have separate functions in separate files ... Even when writing applications [I tend to work on libraries more] I ... Like we recently wrote an app with crypto and DB functionality. ...
    (comp.lang.c)
  • Re: More Etymology!
    ... the catalogs of the libraries I have access to, ... and earliest writing. ... Klaus Schmidt speaks of hieroglyphs: in the case of thirteen small ... "killrating" is, nor why anyone would bother doing it. ...
    (sci.lang)